Created
September 17, 2013 20:51
-
-
Save nathanjsharpe/6600458 to your computer and use it in GitHub Desktop.
rather than specify the association using has_one or belongs_to, you can define it yourself
This file contains hidden or 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 PlaceSerializer < ActiveModel::Serializer | |
attributes :id, :foo, :bar, :features | |
def features | |
feature | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment