Merge pull request #19 from lloydmeta/feature/support_symbol_format

Add support for format as symbol
This commit is contained in:
Christopher Cocchi-Perrier 2013-01-17 07:00:43 -08:00
commit 0761830988

View File

@ -15,7 +15,7 @@ module RablRails
compiled_template = compile_template_from_source(source, path)
format = context.params[:format] || 'json'
Renderers.const_get(format.upcase!).new(context, locals).render(compiled_template)
Renderers.const_get(format.to_s.upcase!).new(context, locals).render(compiled_template)
end
def compile_template_from_source(source, path = nil)