Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Remove unnecessary scoping and validation checks from hm:t#create

  • Loading branch information...
commit 50b83984f111552b91a25b3b1d139f65efcc8e8f 1 parent d9c4087
@lifo lifo authored
View
2  activerecord/lib/active_record/associations/has_many_through_association.rb
@@ -36,7 +36,7 @@ def create_record(attrs, force = true)
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
Please sign in to comment.
Something went wrong with that request. Please try again.