Skip to content
Browse files

just push on to the scope chain items. Oops! (thanks @carlosantonioda…

  • Loading branch information...
1 parent 5b83f46 commit dbdaf75777d4cc16842160747ae8e0002fe271c3 @tenderlove tenderlove committed Jul 16, 2013
View
3 activerecord/lib/active_record/associations/join_dependency/join_association.rb
@@ -106,10 +106,9 @@ def join_to(manager)
end
if reflection.type
- scope_chain_items.concat [
+ scope_chain_items <<
ActiveRecord::Relation.new(reflection.klass, table)
.where(reflection.type => foreign_klass.base_class.name)
- ]
end
scope_chain_items.concat [reflection.klass.send(:build_default_scope)].compact

0 comments on commit dbdaf75

Please sign in to comment.
Something went wrong with that request. Please try again.