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 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Hey there mate, Go to railscast.com i think there is a quick 4 min viedo on it, that should help On May 11, 1:35 pm, rosoft2001 <adin...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> 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--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
You just sent him to a spam search page :( Correct url: http://railscasts.com/episodes/29 Alain Ravet -------- blog.ravet.com/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
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 On May 11, 3:37 am, "Alain Ravet" <alain.ra...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> You just sent him to a spam search page :( > > Correct url: > > http://railscasts.com/episodes/29 > > Alain Ravet > -------- > blog.ravet.com/--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
> -----Original Message----- > From: rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > [mailto:rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org] On Behalf Of Alain Ravet > Sent: 11 May 2007 11:38 > To: rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > Subject: [Rails] Re: group by? > > > You just sent him to a spam search page :( > > Correct url: > > http://railscasts.com/episodes/29Just watched a few of the railscasts. Most productive 20 minutes I''ve spent in the past 2 weeks :-) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---