nesquena/rabl — Issue #129: rabl on non-model objects
Author: marclennox
Created: 2011-10-21 03:54:49+00:00
State: open

I'm getting weird behaviour trying to get a very simple RABL template for a non-model object with a base extends. For the collection template I'm getting an error that the class can't be converted to a Hash, whereas for the single object version I get a "null" response.

# bounds/show.rabl
object @bound
extends 'bounds/base'

This one returns "null"

# bounds/index.rabl
collection @bounds
extends 'bounds/base'

This one complains that Bounds can't be converted to Hash, however if I move the contents of base.rabl into the index.rabl file it works fine. But for the show.rabl, moving the contents of base.rabl into it still results in null.

# bounds/base.rabl
attributes :index, :name, :description