I'm upgrading the project from Rails 3 project to Rails 5. Today I've encountered the strange error for me.
Now project is running on Rails 5. In project there are models User
and Article
. When I'm querying the User
model, everything is fine:
User.all # returns all records
User.first # returns first record
But when I'm querying the Article
model, the same error appears for every query:
Article.all # ArgumentError: wrong number of arguments (given 2, expected 1)
Atricle.first # ArgumentError: wrong number of arguments (given 2, expected 1)
The project uses the devise
gem, the User
model was created by this gem, but the Article
model is not.
The question is how I can investigate this kind of problem? What approach should I use to find the source of error?
Aucun commentaire:
Enregistrer un commentaire