-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
a "test" attribute on model will cause an exception #1261
Comments
yup, sorry about that. do you not have a |
would it be helpful if we just defined a |
That sounds like a terrible idea, as we would keep defining many such methods as more similar issues arise. |
Plus, it does not fix the situation where you have a |
Dunno, OP hasn't responded. As to Ruby stdlib gotchas, those are the only two I can think of. Anyhow, I just meant AMS could be nice and somehow tell you that you've asked for the |
@bf4 There's also |
Closing, as a fix has been merged in master. Could you confirm @ryedog ? |
If you have an attribute called "test" on your model it will throw an exception
There is a "test" method from the kernel on Serializer so when serializing in the attributes instance method of ActiveModel::Serializer you'll get
The source of the test method is
Digging into the implementation of ActiveModel Serializer it's apparent that any attribute with the same name as a method on the Serializer will have similar issues.
The text was updated successfully, but these errors were encountered: