Module: Porth::Format::JSON
- Defined in:
- lib/porth/format/json.rb
Defined Under Namespace
Modules: ControllerExtensions
Class Method Summary collapse
Class Method Details
.call(controller, object) ⇒ Object
4 5 6 7 8 |
# File 'lib/porth/format/json.rb', line 4 def self.call controller, object json = object.to_json callback = controller.send :json_callback callback ? "#{callback}(#{json})" : json end |