Group by?

How can you add an “group by title” clause to:

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


Hey there mate,

Go to i think there is a quick 4 min viedo on it, that
should help

You just sent him to a spam search page :frowning:

Correct url:

Alain R.

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

@books_pages, @books = paginate (:books, :conditions => [‘keyid = ?’,], :order => ‘id DESC’, :per_page => 10, :group => “title” )


Correct url:

Just watched a few of the railscasts. Most productive 20 minutes I’ve
in the past 2 weeks :slight_smile:

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs