aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/generators
diff options
context:
space:
mode:
authorManoj <manoj.mk27@gmail.com>2012-01-28 00:18:59 +0530
committerManoj <manoj.mk27@gmail.com>2012-01-29 15:28:22 +0530
commit336ff8a97e9391d4111e923a9b841376110d04c9 (patch)
tree5590b3f9b97cf896f26bb641a474908fd20d873f /railties/lib/rails/generators
parentfd3211ef677efe9531f38db58919a8c90d65892a (diff)
downloadrails-336ff8a97e9391d4111e923a9b841376110d04c9.tar.gz
rails-336ff8a97e9391d4111e923a9b841376110d04c9.tar.bz2
rails-336ff8a97e9391d4111e923a9b841376110d04c9.zip
has_many/has_one, :dependent => :restrict, deprecation added.
Diffstat (limited to 'railties/lib/rails/generators')
-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