enum_help
enum_help copied to clipboard
Help ActiveRecord::Enum feature to work fine with I18n and simple_form.
Add define_collection_i18n_method_before_type_cast method. Since the ransack gem does not support enum string search, I added a method that returns a before type cast value. ```ruby [1] pry(main)> Advertiser.statuses_i18n => {"default"=>"未承認",...
When I have an enum option that is translated as "No", simple_form shows "false". Am I wrong? PS: workaround is adding a space after "No": ``` enums: user: product_already_have_km: already_customer:...
…ich is helpful for iterating through optional labels based on available languages
Sometimes users need to have select tag like ```html Pending Confirmed ``` instead of ```html Confirmed Confirmed ``` It could be usefull when selectbox is filter-contol element, so developer need...
Hello, this gem works great! One feature could be great, if it could work with delegated attribute. Eg. when is attribute with enum values delegated to another class simple_form doesn't...
thanks for such a great gem. i have a question, is there a way to overwrite the default behavior in view level? Because sometimes I just want to display the...
I use enum in model concern because of using it in multiple models: ``` module Sizeable extend ActiveSupport::Concern included do enum pizza_size: { d22: 22, d33: 33, d38: 38 }...
I don't want or need it. Cluttering up the html. Is there an option to not output those classes?
error trace ``` ruby gems/enum_help-0.0.9/lib/enum_help/railtie.rb:2:in `': uninitialized constant EnumHelp::Rails (NameError) ```
Nice gem! Worked ok, with default simple_form, or with radio_buttons on bootstrap. But when I use :as => :string option, it won´t retrieve the I18n transation.