Class: Visage::JSON
- Inherits:
-
Application
- Object
- Sinatra::Base
- Application
- Visage::JSON
- Defined in:
- lib/visage-app.rb
Instance Method Summary collapse
-
#maybe_wrap_with_callback(json) ⇒ Object
Wraps json with a callback method that JSON-P clients can call.
Instance Method Details
#maybe_wrap_with_callback(json) ⇒ Object
Wraps json with a callback method that JSON-P clients can call.
150 151 152 |
# File 'lib/visage-app.rb', line 150 def maybe_wrap_with_callback(json) params[:callback] ? params[:callback] + '(' + json + ')' : json end |