friendship.befriender = current_user
friendship.befriendee = @friend
if current_user.friends_with?(@friend)
- flash[:warning] = t ".already_a_friend", :name => @friend.display_name
+ flash[:warning] = t ".already_followed", :name => @friend.display_name
elsif current_user.friendships.where(:created_at => Time.now.utc - 1.hour..).count >= current_user.max_friends_per_hour
flash[:error] = t ".limit_exceeded"
elsif friendship.save
Friendship.where(:befriender => current_user, :befriendee => @friend).delete_all
flash[:notice] = t ".success", :name => @friend.display_name
else
- flash[:error] = t ".not_a_friend", :name => @friend.display_name
+ flash[:error] = t ".not_followed", :name => @friend.display_name
end
referer = safe_referer(params[:referer]) if params[:referer]