diff options
author | Eloy Duran <eloy.de.enige@gmail.com> | 2010-01-02 14:59:29 +0100 |
---|---|---|
committer | Eloy Duran <eloy.de.enige@gmail.com> | 2010-01-07 13:19:48 +0100 |
commit | fc6aae34597bbecaf441571b20ab861b021ea8a5 (patch) | |
tree | 6490217d5f1dd26cd64fe2bcca28ed1337148b14 /activerecord/lib | |
parent | a559260e41170397ec940321f12853ccdb440993 (diff) | |
download | rails-fc6aae34597bbecaf441571b20ab861b021ea8a5.tar.gz rails-fc6aae34597bbecaf441571b20ab861b021ea8a5.tar.bz2 rails-fc6aae34597bbecaf441571b20ab861b021ea8a5.zip |
Remove deprecated '_delete' option from NestedAttributes.
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/nested_attributes.rb | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/activerecord/lib/active_record/nested_attributes.rb b/activerecord/lib/active_record/nested_attributes.rb index c86c1a9d18..e1e80355c0 100644 --- a/activerecord/lib/active_record/nested_attributes.rb +++ b/activerecord/lib/active_record/nested_attributes.rb @@ -264,21 +264,11 @@ module ActiveRecord marked_for_destruction? end - # Deal with deprecated _delete. - # - def _delete #:nodoc: - ActiveSupport::Deprecation.warn "_delete is deprecated in nested attributes. Use _destroy instead." - _destroy - end - private # Attribute hash keys that should not be assigned as normal attributes. # These hash keys are nested attributes implementation details. - # - # TODO Remove _delete from UNASSIGNABLE_KEYS when deprecation warning are - # removed. - UNASSIGNABLE_KEYS = %w( id _destroy _delete ) + UNASSIGNABLE_KEYS = %w( id _destroy ) # Assigns the given attributes to the association. # @@ -375,8 +365,7 @@ module ActiveRecord # Determines if a hash contains a truthy _destroy key. def has_destroy_flag?(hash) - ConnectionAdapters::Column.value_to_boolean(hash['_destroy']) || - ConnectionAdapters::Column.value_to_boolean(hash['_delete']) # TODO Remove after deprecation. + ConnectionAdapters::Column.value_to_boolean(hash['_destroy']) end # Determines if a new record should be build by checking for |