clarion/app/views/api/tracks/index.jbuilder
2015-10-08 02:34:19 +03:00

14 lines
330 B
Ruby

json.array! @tracks do |track|
json.extract! track, :id
json.name do
track.translations.each do |translation|
json.set! translation.locale, translation.name
end
end
json.description do
track.translations.each do |translation|
json.set! translation.locale, translation.description
end
end
end