lib/unscoped_associations.rb in unscoped_associations-0.6.3 vs lib/unscoped_associations.rb in unscoped_associations-0.6.4

- old
+ new

@@ -44,10 +44,10 @@ end end def add_unscoped_association(association_name) define_method(association_name) do - if self.class.reflect_on_association(association_name).polymorphic? + if self.class.reflect_on_association(association_name).options.key?(:polymorphic) self.association(association_name).klass.unscoped do super(association_name) end else self.class.reflect_on_association(association_name).klass.unscoped do