Class: Visage::JSON

Inherits:
Application show all
Defined in:
lib/visage-app.rb

Instance Method Summary collapse

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