I
I
Ilnar252016-02-16 17:11:57
Ruby on Rails
Ilnar25, 2016-02-16 17:11:57

How to solve wrong number of arguments (1 for 2)?

I send a Post request to save the message with links. There are 3 models User, Conversation, Message. Writes inconsistency in the number of arguments when applying the scope - "between", to check for correspondence between the authors. New to rails, still learning...
https://drive.google.com/open?id=0B_JNINfzh0boNm1w...
https://drive.google.com/open?id=0B_JNINfzh0boYjVs...
https://drive .google.com/open?id=0B_JNINfzh0boV2k5...
https://drive.google.com/open?id=0B_JNINfzh0boNHJY...
https://drive.google.com/open?id=0B_JNINfzh0boSlB0...

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dima, 2016-02-16
@Ilnar25

"wrong number of arguments (1 for 2)" - incorrect number of arguments. You are passing 1 argument to the method instead of 2.
Solution:
- see which method causes an error when calling
- adds the required argument, or use another method

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question