I want to write a helper for a submit button, that takes in account the action (create or update) to get the right translation. Here they are :
def submit_button(model) if model == nil I18n.t("submit.create.#{model}") else I18n.t("submit.update.#{model}") end end
The %{} is used in en.yml file when you send a local variable from helper or view.