translate_enum
translate_enum copied to clipboard
Easily Translate Enums in Rails
There are some use cases where I'd like to use the `count` functionality so that if you have an enum `model_type` and then you want to show a list of...
Hi, When building forms, doing this ``` = f.input :role, collection: MyModel.translated_roles ``` Method MyModel.translated_roles will return something like ``` [["Administrateur", "admin", "admin"], ["Utilisateur", "user", "user"], ["Master", "master", "master"]] ```...
Hi I needed to add global configuration support for an app that I was working on, had lots of lists and the activerecord.attributes file started to feel too clogged, but...
I am unable to pass a locale to the translated_enum function. There seems to be no way to set a custom locale. Example: ```ruby irb(main):056:0> @invoice.translated_status => "Unpaid" irb(main):057:0> @invoice.translated_status(locale:...
First, thank you for this gem, it's great! While there is a documented `raise` option that can be given for any particular translation call, I couldn't see a way to...
Hey there :wave:, I love this gem concept. Thanks! I am trying to set some global values for enum attributes that are set as part of a concern that gets...
My setup Model.rb ``` enum :o_type, [:ordinary, :straordinary, :warranty] translate_enum :o_type ``` Adding `prefix: true` changes nothing, removing ` translate_enum :o_type` resolves the issue but then I cant use the...