Forum: Ruby on Rails group by?

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.
0e2b790bb24771a7fcd2c7407c72ce76?d=identicon&s=25 rosoft2001 (Guest)
on 2007-05-11 05:36
(Received via mailing list)
How can you add an "group by title" clause to:

@books_pages, @books = paginate (:books, :conditions => ['keyid = ?',
@key.id], :order => 'id DESC',  :per_page => 10 )



Thanks
41809768bb32f3217337361125c2a388?d=identicon&s=25 Camo (Guest)
on 2007-05-11 07:36
(Received via mailing list)
Hey there mate,

Go to railscast.com i think there is a quick 4 min viedo on it, that
should help
Ba3a00606eb530dcab2c4a6a59bf366d?d=identicon&s=25 Alain Ravet (Guest)
on 2007-05-11 12:39
(Received via mailing list)
You just sent him to a spam search page :(

Correct url:

    http://railscasts.com/episodes/29


Alain Ravet
--------
blog.ravet.com/
125639ddcc0b9119bb84e29416ace63a?d=identicon&s=25 Scott (Guest)
on 2007-05-11 23:44
(Received via mailing list)
If I am not mistaken, with pagination you should be able to use all
the parameters that you would on a find. So you could use the :group
option.

@books_pages, @books = paginate (:books, :conditions => ['keyid = ?',
@key.id], :order => 'id DESC',  :per_page => 10, :group => "title" )

Scott
0de2a19e1f26e4675d7dd363cc0157e9?d=identicon&s=25 Cliff Rowley (Guest)
on 2007-05-12 10:05
(Received via mailing list)
> Correct url:
>
>     http://railscasts.com/episodes/29

Just watched a few of the railscasts.  Most productive 20 minutes I've
spent
in the past 2 weeks :-)
This topic is locked and can not be replied to.