aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib
diff options
context:
space:
mode:
authorJon Leighton <j@jonathanleighton.com>2012-01-31 05:45:04 -0800
committerJon Leighton <j@jonathanleighton.com>2012-01-31 05:45:04 -0800
commit30a232800382b3194f4cb2e2d2ad37075e2149db (patch)
treeda1608bacfeae736820d045824801005decb46f3 /railties/lib
parent9a1724073aa9bb5c5e6253aa3f010517fb5007f8 (diff)
parent23074c81a5e0b1e08e2e6555053678e8d656f484 (diff)
downloadrails-30a232800382b3194f4cb2e2d2ad37075e2149db.tar.gz
rails-30a232800382b3194f4cb2e2d2ad37075e2149db.tar.bz2
rails-30a232800382b3194f4cb2e2d2ad37075e2149db.zip
Merge pull request #4727 from railsaholic/dependent_restrict_should_add_error
has_many/has_one, :dependent => :restrict, deprecation added
Diffstat (limited to 'railties/lib')
-rw-r--r--railties/lib/rails/generators/rails/app/templates/config/application.rb5
1 files changed, 5 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 3517956e4a..c3a87d30b4 100644
--- a/railties/lib/rails/generators/rails/app/templates/config/application.rb
+++ b/railties/lib/rails/generators/rails/app/templates/config/application.rb
@@ -56,6 +56,11 @@ module <%= app_const_base %>
# parameters by using an attr_accessible or attr_protected declaration.
# config.active_record.whitelist_attributes = true
+ # Specifies wether or not has_many or has_one association option :dependent => :restrict raises
+ # an exception. If set to true, then an ActiveRecord::DeleteRestrictionError exception would be
+ # raised. If set to false, then an error will be added on the model instead.
+ config.active_record.dependent_restrict_raises = false
+
<% unless options.skip_sprockets? -%>
# Enable the asset pipeline.
config.assets.enabled = true