diff options
author | Pratik Naik <pratiknaik@gmail.com> | 2009-08-10 21:06:49 +0100 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2009-08-10 21:06:49 +0100 |
commit | 50b83984f111552b91a25b3b1d139f65efcc8e8f (patch) | |
tree | 98c622491c1838f876cfd5dfc64713413b2a1ef5 /activerecord/lib/active_record/associations | |
parent | d9c4087a9e73ea31dbb83baa26c02904039fb480 (diff) | |
download | rails-50b83984f111552b91a25b3b1d139f65efcc8e8f.tar.gz rails-50b83984f111552b91a25b3b1d139f65efcc8e8f.tar.bz2 rails-50b83984f111552b91a25b3b1d139f65efcc8e8f.zip |
Remove unnecessary scoping and validation checks from hm:t#create
Diffstat (limited to 'activerecord/lib/active_record/associations')
-rw-r--r-- | activerecord/lib/active_record/associations/has_many_through_association.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/associations/has_many_through_association.rb b/activerecord/lib/active_record/associations/has_many_through_association.rb index c662bb8ec4..f09289ada3 100644 --- a/activerecord/lib/active_record/associations/has_many_through_association.rb +++ b/activerecord/lib/active_record/associations/has_many_through_association.rb @@ -36,7 +36,7 @@ module ActiveRecord ensure_owner_is_not_new transaction do - object = attrs ? @reflection.klass.send(:with_scope, :create => attrs) { @reflection.create_association } : @reflection.create_association + object = @reflection.klass.new(attrs) add_record_to_target_with_callbacks(object) {|r| insert_record(object, force) } object end |