lib/grape-rabl/formatter.rb in grape-rabl-0.0.4 vs lib/grape-rabl/formatter.rb in grape-rabl-0.0.5
- old
+ new
@@ -11,9 +11,10 @@
current_endpoint = env['api.endpoint']
rabl(current_endpoint) do |template|
engine = ::Tilt.new(view_path(template))
rendered = engine.render(current_endpoint, {})
+ headers['Content-Type'] = content_types[env['api.format']]
Rack::Response.new(rendered, status, headers).to_a
end
end
private