enum_help icon indicating copy to clipboard operation
enum_help copied to clipboard

could not use this gem without rails exists, Even though have active_record installed

Open jhjguxin opened this issue 11 years ago • 2 comments

error trace

gems/enum_help-0.0.9/lib/enum_help/railtie.rb:2:in `<module:EnumHelp>': uninitialized constant EnumHelp::Rails (NameError)

jhjguxin avatar Jul 28 '14 12:07 jhjguxin

@jhjguxin

我需要先了解一下使用场景。 请问是否使用了 activesupport ? 因为这个插件需要使用 I18n 配合。 然后我尝试修改一下。

zmbacker avatar Nov 10 '14 16:11 zmbacker

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.

tobypinder avatar Sep 02 '15 10:09 tobypinder