Displaying 1 result from an estimated 1 matches for "all_latest".
2008 Jul 14
1
will_paginate paginates all instead of subclass
...will be
much appreciated.
I have mymodel Call.rb
class Call < ActiveRecord::Base
belongs_to :user
has_many:visits, :dependent => :destroy
has_many:visits do
def latest
find :all, :order => ''id DESC'', :limit => 3
end
def all_latest
find :all, :order => ''id DESC''
end
end
def self.search(search, page)
paginate :per_page => 4, :page => page,
:conditions => [''name like ?'', "%#{search}%"],
:order => ''name'...