I have this function inside user model
def send_request(user_id)
unless Friendship.exists?(self.id,user_id)
Friendship.create(sender_id:self.id, receiver_id:user_id)
end
end
In the rails console u1 = User.find(1)
then u1.send_request(2)
I see ArgumentError (wrong number of arguments (given 2, expected 0..1)
What is the meaning of expected 0..1? and why it is given 2?