Last active
December 17, 2015 18:49
-
-
Save ianpetzer/5656133 to your computer and use it in GitHub Desktop.
User Serializer that includes Opinions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class UserSerializer < ActiveModel::Serializer | |
attributes :id, :name | |
embed :ids, include: :true | |
has_many :opinions | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment