paginate :per_page => 15, :page => page,
:conditions => [''title like ?'',
"%#{search}%"], :order
=> ''requirement_id DESC, created_at DESC''
In my table:
requirement_id/created_at
1/5am
1/3am
2/5pm
2/3pm
How can I specify to only return the first row in each requirement_id
group? That is, I only want to paginate 1/3am and 2/3pm because 1/3am is
the first row in the group requirement_id = 1...
Thanks!
--
Posted via http://www.ruby-forum.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
-~----------~----~----~----~------~----~------~--~---