You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For sorting action need [["planed", 0], ["done", 1], ["loaded", 2]] with translated key.
But Model.statuses_i18n returns array with value = translated(key) and there is no integer keys to find something in database.
Maybe it's not so hard to make enums translated with integer keys?
The text was updated successfully, but these errors were encountered:
I think you need the method Model.statuses which returns a Hash value: {"planed"=> 0, "done"=> 1, "loaded"=> 2}. Model.statuses["planed"] can get the integer value you needed.
For sorting action need [["planed", 0], ["done", 1], ["loaded", 2]] with translated key.
But Model.statuses_i18n returns array with value = translated(key) and there is no integer keys to find something in database.
Maybe it's not so hard to make enums translated with integer keys?
The text was updated successfully, but these errors were encountered: