@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)
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
end
end
- def with_recipient_locale(recipient, &block)
- I18n.with_locale(Locale.available.preferred(recipient.preferred_languages), &block)
+ def with_recipient_locale(recipient, &)
+ I18n.with_locale(Locale.available.preferred(recipient.preferred_languages), &)
end
def from_address(name, type, id, token, user_id = nil)