[Rails] Re: Alphabetically sorted list pages + dynamic forms

Matt Andrews
Sat, 20 May 2006 18:05:35 -0000

Stephen Bartholomew wrote:
> This depends on which fields you want filtered and what your db layout
> is, but basically you would need to find albums with the specified
> letter at the beginning of the artist name:
>
> Album.find(:all, :conditions => ["artist LIKE
''?%'' ", params[:letter]])

Thanks - whereabouts would this code go, though?

Thanks for the other advice, I''ll give that a try.

--
Posted via http://www.ruby-forum.com/.