rabl-rails/lib/rabl-fast-json/handler.rb

15 lines
326 B
Ruby
Raw Normal View History

2012-02-22 18:14:00 +00:00
module RablFastJson
module Handlers
class Rabl
cattr_accessor :default_format
self.default_format = 'application/json'
def self.call(template)
2012-02-22 18:14:00 +00:00
%{
2012-02-27 13:49:34 +00:00
RablFastJson::Library.instance.
get_rendered_template(#{template.source.inspect}, self)
2012-02-22 18:14:00 +00:00
}
end
end
end
end