Created
April 24, 2011 18:56
-
-
Save jashkenas/939797 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # If the request is asking for JSONP (eg. has a 'callback' parameter), then | |
| # short-circuit, and return the rendered JSONP. | |
| def jsonp_request? | |
| return false unless params[:callback] | |
| @callback = params[:callback] | |
| render :partial => 'common/jsonp.js', :type => :js | |
| true | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment