enum_help
enum_help copied to clipboard
could not use this gem without rails exists, Even though have active_record installed
error trace
gems/enum_help-0.0.9/lib/enum_help/railtie.rb:2:in `<module:EnumHelp>': uninitialized constant EnumHelp::Rails (NameError)
@jhjguxin
我需要先了解一下使用场景。 请问是否使用了 activesupport ? 因为这个插件需要使用 I18n 配合。 然后我尝试修改一下。
I couldn't get our Rails engines to work in testing environments with this gem as they aren't "proper" Rails apps. My solution was to add ActiveRecord::Base.send :extend, EnumHelp::I18n from the Railtie into it's own initializer. This might help anyone trying to run enum_help outside of Rails.