Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Merge pull request #3958 from lest/comment-on-whitelist

commented whitelist mode enforcement for mass assignment
  • Loading branch information...
2 parents f9df3ef + f2fa483 commit 148d15d8244f72e2f5b3f2cc9087a43f9e35075f @josevalim josevalim committed
6 railties/lib/rails/generators/rails/app/templates/config/application.rb
@@ -54,6 +54,12 @@ class Application < Rails::Application
# like if you have constraints or database-specific column types
# config.active_record.schema_format = :sql
+ # Enforce whitelist mode for mass assignment.
+ # This will create an empty whitelist of attributes available for mass-assignment for all models
+ # in your app. As such, your models will need to explicitly whitelist or blacklist accessible
+ # parameters by using an attr_accessible or attr_protected declaration.
+ # config.active_record.whitelist_attributes = true
<% unless options.skip_sprockets? -%>
# Enable the asset pipeline
config.assets.enabled = true

0 comments on commit 148d15d

Please sign in to comment.
Something went wrong with that request. Please try again.