You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for the info. I think this has to do with an auto load issue also reported here. I should have some time later today to dig into this more. For now you should be able to get around it by adding app/enums to your autoload paths.
@SingleShot I'm trying to recreate this issue with my own Rails demo app and cannot seem to do so. Here's an example app which uses Rails 4.2 and ClassyEnum 4.0.0. I've tested with Ruby 2.1.4 and 2.1.5 and the enum is autoloading just fine.
Would it be possible for you to create an example app that demonstrates the issue? If not, maybe post your MembershipStatus enum class? Can you also confirm that the enum is in app/enums/membership_status.rb?
I am having an issue with Ruby 2.2.0, but it seems to be unrelated.
I added a 4.0.0 classy_enum to an active record like so (ruby: 2.1.4, rails: 4.2.0):
This active record joins two other tables (User and Group), and defaults the enum value to "pending".
Attempting to load the enum from the database yields:
For example, with:
Downgrading to 3.5.0 without any code changes fixes the problem:
The text was updated successfully, but these errors were encountered: