if current_user.friends_with?(@friend)
flash[:warning] = t ".already_a_friend", :name => @friend.display_name
elsif current_user.friendships.where(:created_at => Time.now.utc - 1.hour..).count >= current_user.max_friends_per_hour
if current_user.friends_with?(@friend)
flash[:warning] = t ".already_a_friend", :name => @friend.display_name
elsif current_user.friendships.where(:created_at => Time.now.utc - 1.hour..).count >= current_user.max_friends_per_hour