Skip to content

Instantly share code, notes, and snippets.

@ruprict
Created March 18, 2012 13:24
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save ruprict/2072203 to your computer and use it in GitHub Desktop.
Kennedy Article on Rails Secuity
model = SomeModel.new(params[:some_model])
if model.save
# ...
end
# or
model = SomeModel.find(params[:id])
if model.update_attributes(params[:some_model])
# ...
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment