From 255c39ef5a7e5c3e70e140921487e3ac9cbdc1c8 Mon Sep 17 00:00:00 2001 From: Alexander Machehin Date: Mon, 30 Jan 2012 12:09:52 +0600 Subject: [PATCH] Revert "Merge branch 'fix-email-i18n' into 114-comment_notifications" This reverts commit 9bf06e5e1a595f320dc4527ebd44f14be05fcd64, reversing changes made to f2bc0e67a91e6283f4881e754e5da95c59cf341b. --- app/mailers/user_mailer.rb | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/app/mailers/user_mailer.rb b/app/mailers/user_mailer.rb index 2c25b14a0..2923e62fd 100644 --- a/app/mailers/user_mailer.rb +++ b/app/mailers/user_mailer.rb @@ -13,41 +13,24 @@ class UserMailer < ActionMailer::Base def new_comment_notification(comment, user) @user = user @comment = comment - set_locale mail(:to => user.email, :subject => I18n.t("notifications.subjects.new_#{comment.commentable.class == Grit::Commit ? 'commit_' : ''}comment_notification")) do |format| format.html end - ensure reset_locale end def new_issue_notification(issue, user) @user = user @issue = issue - set_locale mail(:to => user.email, :subject => I18n.t("notifications.subjects.new_issue_notification")) do |format| format.html end - ensure reset_locale end def issue_assign_notification(issue, user) @user = user @issue = issue - set_locale mail(:to => user.email, :subject => I18n.t("notifications.subjects.issue_assign_notification")) do |format| format.html end - ensure reset_locale end - - protected - - def set_locale - @initial_locale, I18n.locale = I18n.locale, @user.language - end - - def reset_locale - I18n.locale = @initial_locale - end - end