]> git.openstreetmap.org Git - rails.git/commitdiff
Replace deprecated deliver method with deliver_now
authorTom Hughes <tom@compton.nu>
Sat, 10 Jan 2015 11:46:57 +0000 (11:46 +0000)
committerTom Hughes <tom@compton.nu>
Sun, 11 Jan 2015 12:53:06 +0000 (12:53 +0000)
app/controllers/changeset_controller.rb
app/controllers/diary_entry_controller.rb
app/controllers/message_controller.rb
app/controllers/notes_controller.rb
app/controllers/user_controller.rb

index 224c2c48859ea9dec1044a0dbaf09a2a947973f1..eaa87df7bfa5ba3275daa2c12a92fcee68e65e25 100644 (file)
@@ -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
 
index 091744e2226256e0d6aba9cd283a68ec37b896df..741ff15002d2d98e7e0f498e4971d74d772f15cd 100644 (file)
@@ -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
index 4d53943ed9332d7fb87a42e5001337e0df50c093..c7acc90d8f2680438d07573a06e1d30ca774cebc 100644 (file)
@@ -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
index acd88be04329d7f0760ee0e52b69976df581a4d3..7584daf62cfa75f8254154dcf5d3853215c8934d 100644 (file)
@@ -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
index dbfc44a37ad7af34cb558658408366a1c00e6391..a0514c8e986d2fdd6ead3dd7ca35b04818b33114 100644 (file)
@@ -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