Refactor API rabl views
This commit is contained in:
parent
bdfd0edff0
commit
5a1082e93f
@ -1,4 +1,3 @@
|
|||||||
collection @playlists, root: :playlists, object_root: false
|
collection @playlists, root: :playlists, object_root: false
|
||||||
|
|
||||||
attribute :id
|
extends 'api/playlists/show'
|
||||||
attribute :name
|
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
collection @tracks, root: :tracks, object_root: false
|
collection @tracks, root: :tracks, object_root: false
|
||||||
|
|
||||||
attribute :id
|
extends 'api/tracks/show'
|
||||||
attribute :name
|
|
||||||
|
|
||||||
node(:sound_url, if: ->(t) { t.sound? }) { |t| api_sound_url t.sound }
|
node(:sound_url, if: ->(t) { t.sound? }) { |t| api_sound_url t.sound }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user