Skip to content

Commit

Permalink
Merge branch 'master' of git://github.com/al/has_many_polymorphs
Browse files Browse the repository at this point in the history
  • Loading branch information
Evan Weaver committed Dec 10, 2008
2 parents 46a2a76 + 5030a50 commit 1661ef9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion generators/tagging/templates/tagging_extensions.rb
Expand Up @@ -120,7 +120,7 @@ def tagged_with(*tag_list)
sql = "SELECT #{(scope && scope[:select]) || options[:select]} "
sql << "FROM #{(scope && scope[:from]) || options[:from]} "

add_joins!(sql, options, scope)
add_joins!(sql, options[:joins], scope)

sql << "WHERE #{table_name}.#{primary_key} = taggings.taggable_id "
sql << "AND taggings.taggable_type = '#{ActiveRecord::Base.send(:class_name_of_active_record_descendant, self).to_s}' "
Expand Down
2 changes: 1 addition & 1 deletion lib/has_many_polymorphs/reflection.rb
Expand Up @@ -33,7 +33,7 @@ class PolymorphicError < ActiveRecordError #:nodoc:
=end

class PolymorphicReflection < AssociationReflection
class PolymorphicReflection < ThroughReflection
# Stub out the validity check. Has_many_polymorphs checks validity on macro creation, not on reflection.
def check_validity!
# nothing
Expand Down

0 comments on commit 1661ef9

Please sign in to comment.