Hey, anybody know how to set will_paginate to find only the :first
match?
def self.search(search, page)
paginate :per_page => 15, :page => page,
:conditions => [‘title like ?’, “%#{search}%”], :order
=> ‘thread_id DESC, created_at DESC’
end
Thanks
if you’re trying to paginate one at a time, set the :per_page to 1.
On Mon, Jul 28, 2008 at 1:30 PM, Justin Roger <
Brian H. wrote:
if you’re trying to paginate one at a time, set the :per_page to 1.
On Mon, Jul 28, 2008 at 1:30 PM, Justin Roger <
No, I have various rows with similar ID #s and I want to display only
the :first one (most recently updated) in the group
e.g.
id | content |updated
1 | a | fri
1 | b | thur
2 | c | wed
2 | d | mon
I want only 1|a|fri and 2|c|wed