I'm having a bit of trouble with rabl
. This code
collection favourite_groups, root: :groups
extends 'favourites/base'
gives me the following json structure: { groups: [ {..}, {..} ] }
. What I need is to append another node that contains an array - { groups: [ {..}, {..} ], users: [ {..}, {..} ] }
The data is in separate variables, but it can be in one, which ever makes this work.
Ideas?
Ok, nevermind, made it work with this
object false
child favourite_groups => :groups do
collection favourite_groups
extends 'favourites/base'
end
child favourite_users => :users do
collection favourite_users
extends 'favourites/base'
end