To do this, you do not need an assistant, you can achieve this with simple rails. The only thing you need is to order the I18n YAML correctly
fr: helpers: submit: # This will be the default ones, will take effect if no other # are specifically defined for the models. create: "Créer %{model}" update: "Modifier %{model}" # Those will however take effect for all the other models below # for which we define a specific label. user: create: "Créer mon compte" update: "Mettre à jour mon compte" product: create: "Déposer l'objet" update: "Modifier l'objet" session: create: "Se connecter"
After that, you only need to specify the submit button as follows:
<%= f.submit class: 'any class you want to apply' %>
Rails will take the shortcut you need for the button.
You can see more information about this here.
source share