Skip to content

Instantly share code, notes, and snippets.

@vsavkin
Created March 4, 2012 21:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vsavkin/1974980 to your computer and use it in GitHub Desktop.
Save vsavkin/1974980 to your computer and use it in GitHub Desktop.
JSON Serialization in Controller
def update
p = Person.find(params[:id])
if p.update_bank_information params[:bank_information]
render :json => p.as_json
else
render :json => "some kind of error"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment