> For some queries, the sorting is correct. Other times, it's not. I'm not 
> sure what's causing this. Any help would be greatly appreciated!

I've had the same problem. I solved it by using the find_options in 
find_by_contents method. Like this:

find_by_contens(q, options, find_options)

find_options is a hash passed on to active_record’s find when retrieving 
the data from db, useful to i.e. prefetch relationships.

So for your query:

@results = Listing.find_by_contents @search_criteria, {:limit => :all,
:sort => sort_fields},{:order => "name ASC"}

I'm not sure this is the best way but it worked for me.

/David



-- 
Posted via http://www.ruby-forum.com/.
_______________________________________________
Ferret-talk mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ferret-talk

Reply via email to