stateful_enum icon indicating copy to clipboard operation
stateful_enum copied to clipboard

Why override Enum?

Open james2m opened this issue 9 years ago • 1 comments
trafficstars

This looks really good, thank you. I have a couple of questions about the implementation decisions…

I was wondering why you chose to override Enum as opposed to having a separate stateful_enum? And if you're open to going the composition route rather than extending AR::Base?

james2m avatar Apr 08 '16 18:04 james2m

Although I agree with the statement above. I think it is currently fine right? Unless ActiveRecord starts accepting a block argument to their enum method in a future release..

https://github.com/amatsuda/stateful_enum/blob/fa8f17cc39050e428ceb4105f91062669a3679ba/lib/stateful_enum/active_record_extension.rb#L13-L14

jessevdp avatar Nov 16 '22 07:11 jessevdp