In Rails, how to specify default flash messages in i18n locale file
I know there are some preset structures in i18n locale file so that Rails pulls values automatically. For example, if you want to set the default submit button text for new records: # /config/locales/en.yml en: helpers: submit: create: "Create %{model}" user: create: "Sign Up" With this set, in views the following will result: # /app/views/things/new.html.erb <%= f.submit %> #=> Renders a submit button reading "Create Thing" # /app/views/users/new.html.erb <%= f.submit %> #=> Renders a submit button reading "Sign Up" So Rails uses a preset hierarchy for getting the submit button text for