Sha256: 696dc07ef8260d79f5c750018a5368cdfe7b24e3077afa1129f50b3c394134e3
Contents?: true
Size: 569 Bytes
Versions: 13
Compression:
Stored size: 569 Bytes
Contents
module MyApp class SongSerializer include RestPack::Serializer attributes :id, :title, :album_id can_include :albums, :artists can_filter_by :title def title @context[:reverse_title?] ? @model.title.reverse : @model.title end end class AlbumSerializer include RestPack::Serializer attributes :id, :title, :year, :artist_id can_include :artists, :songs can_filter_by :year end class ArtistSerializer include RestPack::Serializer attributes :id, :name, :website can_include :albums, :songs end end
Version data entries
13 entries across 13 versions & 1 rubygems