Class: Tuning::Extensions::ActionView::Handlers::Ruby
- Inherits:
-
Object
- Object
- Tuning::Extensions::ActionView::Handlers::Ruby
- Defined in:
- lib/tuning/extensions/action_view/handlers.rb
Instance Method Summary collapse
Instance Method Details
#call(template) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/tuning/extensions/action_view/handlers.rb', line 9 def call(template) if template.type.json? <<-STRING output = begin #{template.source} end output.to_json STRING else template.source end end |