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

Cannot define attribute named method #99

Closed
arangamani opened this issue Jan 19, 2015 · 2 comments
Closed

Cannot define attribute named method #99

arangamani opened this issue Jan 19, 2015 · 2 comments

Comments

@arangamani
Copy link

When I try to define an attribute named :method, I get the following error:

Attributor::DumpError: Error while dumping attribute method of type V1::MediaTypes::Hello for context $. Reason: wrong number of arguments (0 for 1)

ArgumentError: wrong number of arguments (0 for 1)

This is possibly related to #71

@blanquer
Copy link
Contributor

@arangamani the models are still backed by normal ruby objects (i.e. Object class), therefore there are some methods that cannot be used as attributes as they already exist (because or ruby, or really, other libraries that might inject and intercept them).
What #71 describes is to migrate the backing object to BasicObject which is a blank slate, but unfortunately, that is not necessarily a cakewalk to do...so we'll have to see about the interest and priorities of other issues I guess.

@careo
Copy link
Contributor

careo commented Oct 30, 2015

Duplicate of #71, as that's really how we should end up fixing this.

@careo careo closed this as completed Oct 30, 2015
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

3 participants