Created
October 22, 2012 00:38
-
-
Save stevez/3929094 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
| def request_json | |
| @response['headers']['Content-Type']='application/json' | |
| obj = {"a" => 1, "b"=> 2} | |
| result = obj.to_json | |
| render :string => result, :use_layout_on_ajax => true | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment