<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -10,14 +10,14 @@ module ActiveRecord
 
       def create!(attrs = nil)
         @reflection.klass.transaction do
-          self &lt;&lt; (object = @reflection.klass.send(:with_scope, :create =&gt; attrs) { @reflection.klass.create! })
+          self &lt;&lt; (object = attrs ? @reflection.klass.send(:with_scope, :create =&gt; attrs) { @reflection.klass.create! } : @reflection.klass.create!)
           object
         end
       end
 
       def create(attrs = nil)
         @reflection.klass.transaction do
-          self &lt;&lt; (object = @reflection.klass.send(:with_scope, :create =&gt; attrs) { @reflection.klass.create })
+          self &lt;&lt; (object = attrs ? @reflection.klass.send(:with_scope, :create =&gt; attrs) { @reflection.klass.create } : @reflection.klass.create)
           object
         end
       end</diff>
      <filename>activerecord/lib/active_record/associations/has_many_through_association.rb</filename>
    </modified>
    <modified>
      <diff>@@ -115,6 +115,18 @@ class HasManyThroughAssociationsTest &lt; ActiveRecord::TestCase
     assert posts(:thinking).reload.people(true).collect(&amp;:first_name).include?(&quot;Jeb&quot;)
   end
 
+  def test_associate_with_create_and_no_options
+    peeps = posts(:thinking).people.count
+    posts(:thinking).people.create
+    assert_equal peeps + 1, posts(:thinking).people.count
+  end
+
+  def test_associate_with_create_exclaimation_and_no_options
+    peeps = posts(:thinking).people.count
+    posts(:thinking).people.create!
+    assert_equal peeps + 1, posts(:thinking).people.count
+  end
+
   def test_clear_associations
     assert_queries(2) { posts(:welcome);posts(:welcome).people(true) }
     </diff>
      <filename>activerecord/test/cases/associations/has_many_through_associations_test.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>c353794dff580c8aa63b357b2857c1fadff3104b</id>
    </parent>
  </parents>
  <author>
    <name>Steven Soroka</name>
    <email>ssoroka78@gmail.com</email>
  </author>
  <url>http://github.com/rails/rails/commit/9c20391bbe6ec1c56f8c8ed4aefb31a93576f76a</url>
  <id>9c20391bbe6ec1c56f8c8ed4aefb31a93576f76a</id>
  <committed-date>2008-05-01T12:22:55-07:00</committed-date>
  <authored-date>2008-05-01T12:09:12-07:00</authored-date>
  <message>best solution?

Signed-off-by: Steven Soroka &lt;ssoroka78@gmail.com&gt;</message>
  <tree>fb66a893a06c0a0f452748d808f10a5d74faf61f</tree>
  <committer>
    <name>David Heinemeier Hansson</name>
    <email>david@loudthinking.com</email>
  </committer>
</commit>
