lib/gon/rabl.rb in gon-5.0.4 vs lib/gon/rabl.rb in gon-5.1.0
- old
+ new
@@ -41,10 +41,10 @@
def parse_with_rabl(rabl_path, controller, locals)
locals ||= {}
source = File.read(rabl_path)
include_helpers
- rabl_engine = ::Rabl::Engine.new(source, :format => 'json')
+ rabl_engine = ::Rabl::Engine.new(source, :format => 'json', :template => rabl_path)
output = rabl_engine.render(controller, locals)
JSON.parse(output)
end
def parse_with_rabl_rails(rabl_path, controller, locals)