Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ArgumentError: wrong number of arguments (2 for 1) #123

Open
andyxhadji opened this issue May 11, 2014 · 1 comment
Open

ArgumentError: wrong number of arguments (2 for 1) #123

andyxhadji opened this issue May 11, 2014 · 1 comment

Comments

@andyxhadji
Copy link

When trying to create an object, I get this error:
ArgumentError: wrong number of arguments (2 for 1)
from /usr/lib/ruby/gems/1.9.1/bundler/gems/parse_resource-7851169f01ba/lib/base.rb:74:in `belongs_to'

In the model for the object, I have this line, that seems to be the culprit.
belongs_to :user, :class_name => "fromUser"

The code works when it is just
belongs_to :user

It works fine when the class name is just 'user', but not if i try to change it. Has the class name attribute for belongs_to been implemented? Thanks for the help.

@justuseapen
Copy link

I would imagine not. Are you using active_record?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants