Skip to content

Instantly share code, notes, and snippets.

@clemens
Created July 24, 2014 12:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save clemens/d0e57c3f6cf9529eee29 to your computer and use it in GitHub Desktop.
Save clemens/d0e57c3f6cf9529eee29 to your computer and use it in GitHub Desktop.
Example for using with_options for i18n scopes
<%- with_options(:scope => 'devise.mailer.confirmation_reminder') do |i18n| -%>
<%= email_underlined_title(i18n.t('heading')) %>
<%= i18n.t('salutation', :name => @user.first_name) %>
<%= i18n.t('text') %>
<%= confirmation_url(@user, :locale => I18n.locale, :confirmation_token => @user.confirmation_token) %>
-----
<%= i18n.t('locked_until_confirmed') %>
-----
<%= render 'mailer_common/signature' %>
<%- end -%>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment