Forum: Ferret Reverse Sorting with array

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Ef55fb706527b4c73a772d024054d3a8?d=identicon&s=25 Mike Mangino (Guest)
on 2007-06-26 15:17
I run several websites that receive a lot of concurrent access and use
the ferret DRB server. I am adding sort functionality to my search pages
and have run into problems with the marshalling of Sort and SortField
objects. Using the :sort=>"name" style works, but I can't figure out how
to reverse the sort. Is it possible to reverse the sort by passing a
string?


Thanks,

Mike
http://www.elevatedrails.com
C9dd93aa135988cabf9183d3210665ca?d=identicon&s=25 Jens Kraemer (Guest)
on 2007-06-26 15:44
(Received via mailing list)
On Tue, Jun 26, 2007 at 03:17:45PM +0200, Mike Mangino wrote:
> I run several websites that receive a lot of concurrent access and use
> the ferret DRB server. I am adding sort functionality to my search pages
> and have run into problems with the marshalling of Sort and SortField
> objects. Using the :sort=>"name" style works, but I can't figure out how
> to reverse the sort. Is it possible to reverse the sort by passing a
> string?

of course - just use :sort => 'name DESC'.

Regarding the sort object/marshalling problems - this is supposed to
work, do you have a stack trace and some code leading to it for me?

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
kraemer@webit.de | www.webit.de

Amtsgericht Dresden | HRB 15422
GF Sven Haubold, Hagen Malessa
This topic is locked and can not be replied to.