Add helper method has_one and has_many
Closed this issue · 0 comments
Bhacaz commented
The idea is to be able to use helper method has_one
and has_many
for an attribute and only specified the serializer class.
# before
attribute :friends do |object|
FriendSerializer.new(object.friends)
end
# after
has_many :friends, serializer: 'FriendSerializer'