search for: list_fac

Displaying 2 results from an estimated 2 matches for "list_fac".

2006 Feb 08
7
DRY methodology
...ntially the same list view with multiple sorts? i.e. def list_cl # ordered by clients last name @placement_pages, @placements = paginate( :placements, :include => [:client], :order_by => ''clients.last_name'', :per_page => 14) end def list_fac # ordered by facility @placement_pages, @placements = paginate( :placements, :include => [:facility], :order_by => ''facilities.name'', :per_page => 14) end etc. and then have links at the top of each column header to sort... <%= link_...
2006 Feb 18
1
sql logic is killing me
I know my thinking is sloppy. I want to know how many clients currently in my facility are male... My facilities_controller.rb def list_fac @placement_pages, @placements = paginate( :placements, :conditions => ["placements.facility_id = ?", params[:facility_id] ], :include => [:facility, :client], :order_by => ''facilities.name, clients.last_name, :per_page => 14)...