Replace deprecated deliver method with deliver_now

This commit is contained in:
Tom Hughes 2015-01-10 11:46:57 +00:00
parent ac7bb003ec
commit 360d68ea5c
5 changed files with 9 additions and 9 deletions

View file

@ -336,7 +336,7 @@ class ChangesetController < ApplicationController
# Notify current subscribers of the new comment # Notify current subscribers of the new comment
changeset.subscribers.each do |user| changeset.subscribers.each do |user|
if @user != user if @user != user
Notifier.changeset_comment_notification(comment, user).deliver Notifier.changeset_comment_notification(comment, user).deliver_now
end end
end end

View file

@ -58,7 +58,7 @@ class DiaryEntryController < ApplicationController
@diary_comment.user = @user @diary_comment.user = @user
if @diary_comment.save if @diary_comment.save
if @diary_comment.user != @entry.user if @diary_comment.user != @entry.user
Notifier.diary_comment_notification(@diary_comment).deliver Notifier.diary_comment_notification(@diary_comment).deliver_now
end end
redirect_to :controller => 'diary_entry', :action => 'view', :display_name => @entry.user.display_name, :id => @entry.id redirect_to :controller => 'diary_entry', :action => 'view', :display_name => @entry.user.display_name, :id => @entry.id

View file

@ -24,7 +24,7 @@ class MessageController < ApplicationController
if @message.save if @message.save
flash[:notice] = t 'message.new.message_sent' 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 redirect_to :controller => 'message', :action => 'inbox', :display_name => @user.display_name
end end
end end

View file

@ -361,7 +361,7 @@ private
note.comments.map { |c| c.author }.uniq.each do |user| note.comments.map { |c| c.author }.uniq.each do |user|
if notify and user and user != @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 end
end end

View file

@ -105,7 +105,7 @@ class UserController < ApplicationController
successful_login(@user) successful_login(@user)
else else
session[:token] = @user.tokens.create.token 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 redirect_to :action => 'confirm', :display_name => @user.display_name
end end
else else
@ -165,7 +165,7 @@ class UserController < ApplicationController
if user if user
token = user.tokens.create 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' flash[:notice] = t 'user.lost_password.notice email on way'
redirect_to :action => 'login' redirect_to :action => 'login'
else else
@ -353,7 +353,7 @@ class UserController < ApplicationController
def confirm_resend def confirm_resend
if user = User.find_by_display_name(params[:display_name]) 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 flash[:notice] = t 'user.confirm_resend.success', :email => user.email
else else
flash[:notice] = t 'user.confirm_resend.failure', :name => params[:display_name] 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) unless @user.is_friends_with?(@new_friend)
if friend.save if friend.save
flash[:notice] = t 'user.make_friend.success', :name => @new_friend.display_name flash[:notice] = t 'user.make_friend.success', :name => @new_friend.display_name
Notifier.friend_notification(friend).deliver Notifier.friend_notification(friend).deliver_now
else else
friend.add_error(t('user.make_friend.failed', :name => @new_friend.display_name)) friend.add_error(t('user.make_friend.failed', :name => @new_friend.display_name))
end end
@ -733,7 +733,7 @@ private
flash.now[:notice] = t 'user.account.flash update success confirm needed' flash.now[:notice] = t 'user.account.flash update success confirm needed'
begin begin
Notifier.email_confirm(user, user.tokens.create).deliver Notifier.email_confirm(user, user.tokens.create).deliver_now
rescue rescue
# Ignore errors sending email # Ignore errors sending email
end end