Skip to content

Commit

Permalink
Allow :joins option.
Browse files Browse the repository at this point in the history
  • Loading branch information
lawrencepit authored and pat committed May 11, 2009
1 parent 5eca710 commit c36abb8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/thinking_sphinx/collection.rb
Expand Up @@ -46,6 +46,7 @@ def self.instances_from_class(klass, matches, options = {})
ids = matches.collect { |match| match[:attributes]["sphinx_internal_id"] }
instances = ids.length > 0 ? klass.find(
:all,
:joins => options[:joins]
:conditions => {klass.primary_key.to_sym => ids},
:include => (options[:include] || index_options[:include]),
:select => (options[:select] || index_options[:select]),
Expand Down

0 comments on commit c36abb8

Please sign in to comment.