Skip to content

Instantly share code, notes, and snippets.

@danielcooper
Created March 5, 2012 23:16
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 danielcooper/1981912 to your computer and use it in GitHub Desktop.
Save danielcooper/1981912 to your computer and use it in GitHub Desktop.
Mass Assignment
class User < ActiveRecord::Base
end
class UsersController < ApplicationController
def update
User.find(params[:id]).update_attributes(params[:user])
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment