You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I ran into the same issue - the documentation on GitHub reflects the master branch, which contains the changes in this pull request that adds support for the attributes method, but haven't been pushed as a new gem version (0.10.4 I believe). To fix for now I just updated my Gemfile to use the git repo:
@jholton @mzaccari Thanks for the issue and helping each other out! I have a little more work to do before the next release. Let me know how things are going. ;)
The docs say to use the
attributes
method:https://github.com/rails-api/active_model_serializers/blob/master/docs/howto/serialize_poro.md
However, using version 0.10.3 in my project, when I try this I get an error:
undefined method 'attributes' for MyModel:Class (NoMethodError)
Using attr_accessor, as the previous documentation describes, works for me:
https://github.com/rails-api/active_model_serializers/blob/05618eac3d1b793cca8c2337090d00102f44f442/docs/howto/serialize_poro.md
Does the current documentation describe behavior not available in 0.10.3?
Or is the documentation wrong?
Thanks.
The text was updated successfully, but these errors were encountered: