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
in the Custom Serializers section of the readme, as written, Person.new.attributes will error on both options and scope not being defined.
It seems like the fix might be to move both methods full_name and attribtues into an ActiveModel::Serializer class rather than an ActiveRecord::Base. However then I get wrong number of arguments on the super(options) line, and full_name needs to be changed to use object.first_name.
The text was updated successfully, but these errors were encountered:
in the Custom Serializers section of the readme, as written,
Person.new.attributes
will error on bothoptions
andscope
not being defined.It seems like the fix might be to move both methods
full_name
andattribtues
into anActiveModel::Serializer
class rather than anActiveRecord::Base
. However then I get wrong number of arguments on thesuper(options)
line, andfull_name
needs to be changed to useobject.first_name
.The text was updated successfully, but these errors were encountered: