lib/grape-rabl/formatter.rb in grape-rabl-0.1.0 vs lib/grape-rabl/formatter.rb in grape-rabl-0.2.0
- old
+ new
@@ -11,10 +11,10 @@
@env = env
@endpoint = env['api.endpoint']
if rablable?
rabl do |template|
- engine = ::Tilt.new(view_path(template))
+ engine = ::Tilt.new(view_path(template), {format: env['api.format'], view_path: env['api.tilt.root']})
engine.render endpoint, {}
end
else
Grape::Formatter::Json.call object, env
end