From: Tom Hughes Date: Sat, 10 Jan 2015 11:46:57 +0000 (+0000) Subject: Replace deprecated deliver method with deliver_now X-Git-Tag: live~4299^2~5 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/360d68ea5c756a8b784b425f1346eb333da2e3d2 Replace deprecated deliver method with deliver_now --- diff --git a/app/controllers/changeset_controller.rb b/app/controllers/changeset_controller.rb index 224c2c488..eaa87df7b 100644 --- a/app/controllers/changeset_controller.rb +++ b/app/controllers/changeset_controller.rb @@ -336,7 +336,7 @@ class ChangesetController < ApplicationController # Notify current subscribers of the new comment changeset.subscribers.each do |user| if @user != user - Notifier.changeset_comment_notification(comment, user).deliver + Notifier.changeset_comment_notification(comment, user).deliver_now end end diff --git a/app/controllers/diary_entry_controller.rb b/app/controllers/diary_entry_controller.rb index 091744e22..741ff1500 100644 --- a/app/controllers/diary_entry_controller.rb +++ b/app/controllers/diary_entry_controller.rb @@ -58,7 +58,7 @@ class DiaryEntryController < ApplicationController @diary_comment.user = @user if @diary_comment.save if @diary_comment.user != @entry.user - Notifier.diary_comment_notification(@diary_comment).deliver + Notifier.diary_comment_notification(@diary_comment).deliver_now end redirect_to :controller => 'diary_entry', :action => 'view', :display_name => @entry.user.display_name, :id => @entry.id diff --git a/app/controllers/message_controller.rb b/app/controllers/message_controller.rb index 4d53943ed..c7acc90d8 100644 --- a/app/controllers/message_controller.rb +++ b/app/controllers/message_controller.rb @@ -24,7 +24,7 @@ class MessageController < ApplicationController if @message.save flash[:notice] = t 'message.new.message_sent' - Notifier.message_notification(@message).deliver + Notifier.message_notification(@message).deliver_now redirect_to :controller => 'message', :action => 'inbox', :display_name => @user.display_name end end diff --git a/app/controllers/notes_controller.rb b/app/controllers/notes_controller.rb index acd88be04..7584daf62 100644 --- a/app/controllers/notes_controller.rb +++ b/app/controllers/notes_controller.rb @@ -361,7 +361,7 @@ private note.comments.map { |c| c.author }.uniq.each do |user| if notify and user and user != @user - Notifier.note_comment_notification(comment, user).deliver + Notifier.note_comment_notification(comment, user).deliver_now end end end diff --git a/app/controllers/user_controller.rb b/app/controllers/user_controller.rb index dbfc44a37..a0514c8e9 100644 --- a/app/controllers/user_controller.rb +++ b/app/controllers/user_controller.rb @@ -105,7 +105,7 @@ class UserController < ApplicationController successful_login(@user) else session[:token] = @user.tokens.create.token - Notifier.signup_confirm(@user, @user.tokens.create(:referer => referer)).deliver + Notifier.signup_confirm(@user, @user.tokens.create(:referer => referer)).deliver_now redirect_to :action => 'confirm', :display_name => @user.display_name end else @@ -165,7 +165,7 @@ class UserController < ApplicationController if user token = user.tokens.create - Notifier.lost_password(user, token).deliver + Notifier.lost_password(user, token).deliver_now flash[:notice] = t 'user.lost_password.notice email on way' redirect_to :action => 'login' else @@ -353,7 +353,7 @@ class UserController < ApplicationController def confirm_resend if user = User.find_by_display_name(params[:display_name]) - Notifier.signup_confirm(user, user.tokens.create).deliver + Notifier.signup_confirm(user, user.tokens.create).deliver_now flash[:notice] = t 'user.confirm_resend.success', :email => user.email else flash[:notice] = t 'user.confirm_resend.failure', :name => params[:display_name] @@ -424,7 +424,7 @@ class UserController < ApplicationController unless @user.is_friends_with?(@new_friend) if friend.save flash[:notice] = t 'user.make_friend.success', :name => @new_friend.display_name - Notifier.friend_notification(friend).deliver + Notifier.friend_notification(friend).deliver_now else friend.add_error(t('user.make_friend.failed', :name => @new_friend.display_name)) end @@ -733,7 +733,7 @@ private flash.now[:notice] = t 'user.account.flash update success confirm needed' begin - Notifier.email_confirm(user, user.tokens.create).deliver + Notifier.email_confirm(user, user.tokens.create).deliver_now rescue # Ignore errors sending email end