It would be nice if the rabl/jbuilder template could automatically use the same template as the controller action. This seems like a good behavior to preload some records into JavaScript which can then later be fetched by the same action.
def index
@products = Product.all
gon.rabl as: "products"
# would load "index.json.rabl"
end
It would be nice if the rabl/jbuilder template could automatically use the same template as the controller action. This seems like a good behavior to preload some records into JavaScript which can then later be fetched by the same action.