On Fri, Mar 23, 2007 at 11:35:20PM +0100, david wrote:
> hi, how can i select only some fields when ferret do the query? like a
> :select => 'id', for the find....i've tried to do it where i do the
> :include => [:something], but it doesn't work...is it right or i've to
> put it in another place?
the right place is the second argument hash of find_by_contents:
Model.find_by_contents(query, {}, { :select => 'id' })
I didn't ever try with select but if it's a valid option to find :all,
it should work.
Jens
--
Jens Krämer
webit! Gesellschaft für neue Medien mbH
Schnorrstraße 76 | 01069 Dresden
Telefon +49 351 46766-0 | Telefax +49 351 46766-66
[EMAIL PROTECTED] | www.webit.de
Amtsgericht Dresden | HRB 15422
GF Sven Haubold, Hagen Malessa
_______________________________________________
Ferret-talk mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ferret-talk