Permalink
Browse files

Making has-many-assoc.search less fussy about association names - it'…

…s not always right.
  • Loading branch information...
1 parent 1d4e3b2 commit 2fa9139776b2059b7b3a14f35facc99e12181805 @pat pat committed Sep 13, 2009
Showing with 1 addition and 2 deletions.
  1. +1 −2 lib/thinking_sphinx/active_record/has_many_association.rb
@@ -9,8 +9,7 @@ def search(*args)
(@reflection.klass.sphinx_indexes || []).each do |index|
attribute = index.attributes.detect { |attrib|
attrib.columns.length == 1 &&
- attrib.columns.first.__name == foreign_key.to_sym &&
- attrib.columns.first.__stack == stack
+ attrib.columns.first.__name == foreign_key.to_sym
}
break if attribute
end

0 comments on commit 2fa9139

Please sign in to comment.