Notes posted by KiChjang
RSS feed
KiChjang -
February 19, 2014
0 thanks
Rendering JSONP
If you provide the :callback option with a nil value, then the default JSON object will be returned. As such, this makes creating JSONP response from the render syntax very easy in your controllers, like so:
render json: @object, callback: params[:jsoncallback]