diff options
author | Jon Leighton <j@jonathanleighton.com> | 2012-08-10 12:33:51 +0100 |
---|---|---|
committer | Jon Leighton <j@jonathanleighton.com> | 2012-08-10 17:45:06 +0100 |
commit | 5ad79989ef0a015fd22cfed90b2e8a56881e6c36 (patch) | |
tree | 8840456df7fb008c3306dae389f7cd73ec531977 /activerecord/lib/active_record/core.rb | |
parent | d1835db6b5efce31af935aa804c7b537e14764d2 (diff) | |
download | rails-5ad79989ef0a015fd22cfed90b2e8a56881e6c36.tar.gz rails-5ad79989ef0a015fd22cfed90b2e8a56881e6c36.tar.bz2 rails-5ad79989ef0a015fd22cfed90b2e8a56881e6c36.zip |
Remove the dependent_restrict_raises option.
It's not really a good idea to have this as a global config option. We
should allow people to specify the behaviour per association.
There will now be two new values:
* :dependent => :restrict_with_exception implements the current
behaviour of :restrict. :restrict itself is deprecated in favour of
:restrict_with_exception.
* :dependent => :restrict_with_error implements the new behaviour - it
adds an error to the owner if there are dependent records present
See #4727 for the original discussion of this.
Diffstat (limited to 'activerecord/lib/active_record/core.rb')
-rw-r--r-- | activerecord/lib/active_record/core.rb | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/activerecord/lib/active_record/core.rb b/activerecord/lib/active_record/core.rb index 1145d2138c..0fddfdf0cb 100644 --- a/activerecord/lib/active_record/core.rb +++ b/activerecord/lib/active_record/core.rb @@ -82,15 +82,6 @@ module ActiveRecord # The connection handler config_attribute :connection_handler - ## - # :singleton-method: - # Specifies whether or not has_many or has_one association option - # :dependent => :restrict raises an exception. If set to true, the - # ActiveRecord::DeleteRestrictionError exception will be raised - # along with a DEPRECATION WARNING. If set to false, an error would - # be added to the model instead. - config_attribute :dependent_restrict_raises - %w(logger configurations default_timezone schema_format timestamped_migrations).each do |name| config_attribute name, global: true end |