Skip to content

Conversation

@ihatov08
Copy link

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=>"否認"}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant