Ok.. after digging more into acts_as_ferret.rb, I realize I can add an 
attr_accessor for @results

Any reason/problem that I shouldn't be doing that that since it was not 
left out in the latest release?

Another problem I'm having now is to sort the result by using the 
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.

but I wasn't able to get it to work with :order by doing this...

moto=Pay.find_by_contents("motorola",:limit=>:all,:order=>"salary DESC")

anyone has similar problems too? thanks for helping!

Rgds
Alfred Toh
Payscroll.com

Alfred Toh wrote:
> Hi Guys
> 
> I'm experiencing with AAF and Ferret with the intention of deploying 
> into the site that I am working on now.
> 
> So I setup AAF to index 3 fields that I have in this model and i tried 
> doing a find_by_contents and it returned the
> 
> #<FerretMixin::Acts::ARFerret::SearchResults:0xb74b5bec 
> @total_hits=1157, @results=[#<Payprofile:0xb74cc39c 
> @attributes={"add......
> 
> but it seems that there is no way to access the result set... I read 
> somewhere that it's not implement yet.. So any knows when the release 
> will be. and until there is there any workaround for this.
> 
> I know that you can do a find_by_contents_id, but that returns the model 
> id set, and then you need to build the result set from the id.
> 
> Thanks for any advice!
> 
> Rgds
> Alfred Toh
> Payscroll.com


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

Reply via email to