Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

  • Loading branch information...
commit dbdaf75777d4cc16842160747ae8e0002fe271c3 1 parent 5b83f46
@tenderlove tenderlove authored
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
Please sign in to comment.
Something went wrong with that request. Please try again.