Skip to content

Instantly share code, notes, and snippets.

@jbarnette
Created March 5, 2012 02:37
Show Gist options
  • Select an option

  • Save jbarnette/1976133 to your computer and use it in GitHub Desktop.

Select an option

Save jbarnette/1976133 to your computer and use it in GitHub Desktop.

Revisions

  1. jbarnette created this gist Mar 5, 2012.
    8 changes: 8 additions & 0 deletions ar.rb
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,8 @@
    class ActiveRecord::Base
    attr_accessible nil

    def update_attributes *args
    raise "Don't call #{self.class.name}#update_attributes. " +
    "Mass assignment is pure evil."
    end
    end