diff options
author | José Valim <jose.valim@gmail.com> | 2011-12-12 23:57:02 -0800 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2011-12-12 23:57:02 -0800 |
commit | 148d15d8244f72e2f5b3f2cc9087a43f9e35075f (patch) | |
tree | e0c34e982707b08325565c9d6a8ddc7390674354 /railties/lib | |
parent | f9df3ef845efe3918d7435c9b6f651b7a5c22b67 (diff) | |
parent | f2fa4837a8a888ee86997be892d0aa5bbd2b5fd0 (diff) | |
download | rails-148d15d8244f72e2f5b3f2cc9087a43f9e35075f.tar.gz rails-148d15d8244f72e2f5b3f2cc9087a43f9e35075f.tar.bz2 rails-148d15d8244f72e2f5b3f2cc9087a43f9e35075f.zip |
Merge pull request #3958 from lest/comment-on-whitelist
commented whitelist mode enforcement for mass assignment
Diffstat (limited to 'railties/lib')
-rw-r--r-- | railties/lib/rails/generators/rails/app/templates/config/application.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/railties/lib/rails/generators/rails/app/templates/config/application.rb b/railties/lib/rails/generators/rails/app/templates/config/application.rb index 40fd843b1b..c6dfa1f2dd 100644 --- a/railties/lib/rails/generators/rails/app/templates/config/application.rb +++ b/railties/lib/rails/generators/rails/app/templates/config/application.rb @@ -54,6 +54,12 @@ module <%= app_const_base %> # 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 |