From ecb1981bfd3ffaca3a3efd110fc85380ece8191d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Mendon=C3=A7a=20Fran=C3=A7a?= Date: Mon, 29 Dec 2014 23:46:55 -0300 Subject: Template lookup now respect default locale and I18n fallbacks. Given the following templates: mailer/demo.html.erb mailer/demo.en.html.erb mailer/demo.pt.html.erb Before this change for a locale that doesn't have its related file the `mailer/demo.html.erb` will be rendered even if `en` is the default locale. Now `mailer/demo.en.html.erb` has precedence over the file without locale. Also, it is possible to give a fallback. mailer/demo.pt.html.erb mailer/demo.pt-BR.html.erb So if the locale is `pt-PT`, `mailer/demo.pt.html.erb` will be rendered given the right I18n fallback configuration. Fixes #11884. --- actionmailer/lib/action_mailer/base.rb | 2 -- 1 file changed, 2 deletions(-) (limited to 'actionmailer/lib/action_mailer') diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb index 021a758940..53cc1fdb31 100644 --- a/actionmailer/lib/action_mailer/base.rb +++ b/actionmailer/lib/action_mailer/base.rb @@ -586,8 +586,6 @@ module ActionMailer } ActiveSupport::Notifications.instrument("process.action_mailer", payload) do - lookup_context.skip_default_locale! - super @_message = NullMail.new unless @_mail_was_called end -- cgit v1.2.3