enum_help icon indicating copy to clipboard operation
enum_help copied to clipboard

Add define_collection_i18n_method_before_type_cast

Open ihatov08 opened this issue 5 years ago • 0 comments

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.

[1] pry(main)> Advertiser.statuses_i18n
=> {"default"=>"未承認", "approved"=>"承認", "rejected"=>"否認"}
[2] pry(main)> Advertiser.statuses_i18n_before_type_cast
=> {10=>"未承認", 20=>"承認", 30=>"否認"}

ihatov08 avatar Oct 15 '20 08:10 ihatov08