Displaying 2 results from an estimated 2 matches for "list_employees".
2006 Apr 06
6
pagination question
i''ve figured out how to use the next and previous links with the
paginator class but now i''m trying to figure out how to display all the
page numbers in between. looking through the rails api, i found
paginator.each() but i''m not sure how to use it, or if that''s even what
i am looking for.
also, is there a way to limit the amount of pages like some sites
2006 May 06
0
RE: Rails Digest, Vol 20, Issue 156
...class Employee < ActiveRecord::Base
belongs_to :department
end
class Department < ActiveRecord::Base
has_many :employees
end
In my controller, I need to get a list of employees working in a given
department, and I need to paginate this list. Any pointers on how to
acheive this?
def list_employees
department_name = "My Department"
@employees = # ... ??
@employee_pages = # ...??
end
Thanks,
Binil
--
Posted via http://www.ruby-forum.com/.
------------------------------
Message: 6
Date: Sat, 6 May 2006 07:38:58 -0600
From: Dave Thomas <dave@pragprog.com>
Subj...