The following works as it should with the conditional:
collection @publish_times
child(:task, :if => lambda { |publish_time| publish_time.task_id.present? }) do
extends "api/tasks/task"
end
But as soon as I try to alias the child object it throws an error:
# remove the alias (:todo) or the conditional (:if) and this works
collection @publish_times
child(:task => :todo, :if => lambda { |publish_time| publish_time.task_id.present? }) do
extends "api/tasks/task"
end
Error:
ActionView::Template::Error (undefined method `card_image' for :task:Symbol):
Where "card_image" is a method call on the task in _task.json.rabl
The following works as it should with the conditional:
But as soon as I try to alias the child object it throws an error:
Error:
Where "card_image" is a method call on the task in _task.json.rabl