I have been using Rabl and I thought I should give rabl-rails a try as it promises faster responses.
I am using public_activity gem which has a polymorphic belongs_to
belongs_to :trackable, :polymorphic => true
When I use child :trackable while using rabl, everything works as expected, and the key of the child object is actually the model name. But in rabl-rails the key comes as it is, i-e 'trackable' and its empty.
I have been using Rabl and I thought I should give rabl-rails a try as it promises faster responses. I am using public_activity gem which has a polymorphic belongs_to
belongs_to :trackable, :polymorphic => true
When I use
child :trackable
while using rabl, everything works as expected, and the key of the child object is actually the model name. But in rabl-rails the key comes as it is, i-e 'trackable' and its empty.An example with rable
with rabl-rails