Skip to content

Instantly share code, notes, and snippets.

@michiel3
Created March 6, 2012 13:39
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 michiel3/1986326 to your computer and use it in GitHub Desktop.
Save michiel3/1986326 to your computer and use it in GitHub Desktop.
Mass assignment protection enabled
1.8.7-p352 :022 > User.create(:username => "michiel", :password => "password", :email => "info@online24.nl", :is_admin => 1)
ActiveModel::MassAssignmentSecurity::Error: Can't mass-assign protected attributes: is_admin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment