<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -2,18 +2,17 @@ module ActiveRecord #:nodoc:
   module Reflection #:nodoc:
     
     module ClassMethods #:nodoc:
-  
-      # Update the default reflection switch so that &lt;tt&gt;:has_many_polymorphs&lt;/tt&gt; types get instantiated. It's not a composed method so we have to override the whole thing.
+      
       def create_reflection(macro, name, options, active_record)
         case macro
           when :has_many, :belongs_to, :has_one, :has_and_belongs_to_many
-            reflection = AssociationReflection.new(macro, name, options, active_record)
+            klass = options[:through] ? ThroughReflection : AssociationReflection
+            reflection = klass.new(macro, name, options, active_record)
           when :composed_of
             reflection = AggregateReflection.new(macro, name, options, active_record)
-        # added by has_many_polymorphs #
+          # added by has_many_polymorphs #
           when :has_many_polymorphs
             reflection = PolymorphicReflection.new(macro, name, options, active_record)
-        # end added #
         end
         write_inheritable_hash :reflections, name =&gt; reflection
         reflection</diff>
      <filename>lib/has_many_polymorphs/reflection.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>d343f39684df3cc945491edbd7bce776642ab378</id>
    </parent>
  </parents>
  <author>
    <name>Martin Gamsjaeger</name>
    <email>gamsnjaga@gmail.com</email>
  </author>
  <url>http://github.com/fauna/has_many_polymorphs/commit/e11df9eaec1bc529e05816476d87c76c54755fb2</url>
  <id>e11df9eaec1bc529e05816476d87c76c54755fb2</id>
  <committed-date>2008-10-17T08:16:49-07:00</committed-date>
  <authored-date>2008-10-17T08:16:49-07:00</authored-date>
  <message>Fixed hmp for edgerails 2.2</message>
  <tree>8dd691dd382cbd464080a1d9a7b476f3ab9d20b7</tree>
  <committer>
    <name>Martin Gamsjaeger</name>
    <email>gamsnjaga@gmail.com</email>
  </committer>
</commit>
