Created
June 5, 2009 07:01
-
-
Save dominiek/124116 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
# After get, show operations | |
def render_json_collection(collection) | |
hash = {:status => {:code => 200}} | |
hash[:result] = collection | |
render_json_with_callback(hash.to_json) | |
end | |
# After delete, create operations | |
def render_status(status) | |
hash = {:status => status} | |
respond_to do |format| | |
format.json { render_json_with_callback(hash.to_json) } | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment