]> git.openstreetmap.org Git - rails.git/blobdiff - app/mailers/user_mailer.rb
Use a custom cop to check controller action names
[rails.git] / app / mailers / user_mailer.rb
index dee3dafbed35562ab865f11c64fcad4d61e8a067..6098162852039a0078c927b7fce5b717e681196c 100644 (file)
@@ -78,7 +78,7 @@ class UserMailer < ApplicationMailer
       @text = message.body
       @title = message.title
       @readurl = message_url(message)
-      @replyurl = message_reply_url(message)
+      @replyurl = new_message_reply_url(message)
       @author = @from_user
 
       attach_user_avatar(message.sender)
@@ -119,16 +119,16 @@ class UserMailer < ApplicationMailer
     end
   end
 
-  def friendship_notification(friendship)
-    with_recipient_locale friendship.befriendee do
-      @friendship = friendship
-      @viewurl = user_url(@friendship.befriender)
-      @friendurl = make_friend_url(@friendship.befriender)
-      @author = @friendship.befriender.display_name
+  def follow_notification(follow)
+    with_recipient_locale follow.following do
+      @follow = follow
+      @viewurl = user_url(@follow.follower)
+      @followurl = follow_url(@follow.follower)
+      @author = @follow.follower.display_name
 
-      attach_user_avatar(@friendship.befriender)
-      mail :to => friendship.befriendee.email,
-           :subject => t(".subject", :user => friendship.befriender.display_name)
+      attach_user_avatar(@follow.follower)
+      mail :to => follow.following.email,
+           :subject => t(".subject", :user => follow.follower.display_name)
     end
   end