]> git.openstreetmap.org Git - rails.git/blobdiff - app/mailers/user_mailer.rb
Rename friendship_notification to follow_notification
[rails.git] / app / mailers / user_mailer.rb
index 1dd13fb2d220787af6562f11281abb6bd0da07cc..6098162852039a0078c927b7fce5b717e681196c 100644 (file)
@@ -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
-
-      attach_user_avatar(@friendship.befriender)
-      mail :to => friendship.befriendee.email,
-           :subject => t(".subject", :user => 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(@follow.follower)
+      mail :to => follow.following.email,
+           :subject => t(".subject", :user => follow.follower.display_name)
     end
   end