Class: ActionView::TemplateHandlers::JSONBuilder
- Inherits:
-
TemplateHandler
- Object
- TemplateHandler
- ActionView::TemplateHandlers::JSONBuilder
- Includes:
- Compilable
- Defined in:
- lib/json_builder/template.rb
Instance Method Summary collapse
Instance Method Details
#compile(template) ⇒ Object
21 22 23 24 25 |
# File 'lib/json_builder/template.rb', line 21 def compile(template) %{ ::JSONBuilder::Compiler.generate(:scope => self, :pretty => ActionView::Base.pretty_print_json, :callback => ActionView::Base.json_callback) { #{template.source} } } end |