diff options
author | Pratik Naik <pratiknaik@gmail.com> | 2008-09-10 18:50:01 +0100 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2008-09-10 18:50:01 +0100 |
commit | 9994f0d90248db7d7eae36f0b597a15e8a427612 (patch) | |
tree | bec9c6d368cca2b8bb079173a459d37fd473cb4e /activerecord/lib/active_record/associations/association_collection.rb | |
parent | b518b6c0d3e7796e303c2396de97a8d901aeb308 (diff) | |
download | rails-9994f0d90248db7d7eae36f0b597a15e8a427612.tar.gz rails-9994f0d90248db7d7eae36f0b597a15e8a427612.tar.bz2 rails-9994f0d90248db7d7eae36f0b597a15e8a427612.zip |
Revert "Add :accessible option to Associations for allowing mass assignments using hash. [#474 state:resolved]"
This reverts commit e0750d6a5c7f621e4ca12205137c0b135cab444a.
Conflicts:
activerecord/CHANGELOG
activerecord/lib/active_record/associations.rb
activerecord/lib/active_record/associations/association_collection.rb
Diffstat (limited to 'activerecord/lib/active_record/associations/association_collection.rb')
-rw-r--r-- | activerecord/lib/active_record/associations/association_collection.rb | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/activerecord/lib/active_record/associations/association_collection.rb b/activerecord/lib/active_record/associations/association_collection.rb index d4bb43970f..8de528f638 100644 --- a/activerecord/lib/active_record/associations/association_collection.rb +++ b/activerecord/lib/active_record/associations/association_collection.rb @@ -110,8 +110,6 @@ module ActiveRecord @owner.transaction do flatten_deeper(records).each do |record| - record = @reflection.build_association(record) if @reflection.options[:accessible] && record.is_a?(Hash) - raise_on_type_mismatch(record) add_record_to_target_with_callbacks(record) do |r| result &&= insert_record(record) unless @owner.new_record? @@ -286,10 +284,6 @@ module ActiveRecord # Replace this collection with +other_array+ # This will perform a diff and delete/add only records that have changed. def replace(other_array) - other_array.map! do |val| - val.is_a?(Hash) ? @reflection.build_association(val) : val - end if @reflection.options[:accessible] - other_array.each { |val| raise_on_type_mismatch(val) } load_target |