search for: sortinghelper

Displaying 4 results from an estimated 4 matches for "sortinghelper".

2006 Feb 02
2
uninitialized constant
Ok, I searched but couldn''t find anything and I even tried the RoR IRC channel with no help. I get this error: uninitialized constant Airport I used this code which I got from the RoR site. helper :sorting def list @sorter = SortingHelper::Sorter.new self, %w(icao host_id name), @params[''sort''], @params[''order''], ''icao'', ''ASC'' @pages = Paginator.new self, Airport.count, 10, @params[''page''] @airports = Airport.find_all nil, @sorter.t...
2008 Apr 23
0
self referential (n-n relationship) belongs many controller
...e http://www.w3.org/2001/tag/doc/whenToUseGet.html) verify :method => :post, :only => [ :destroy, :create, :update ], :redirect_to => { :action => :list } def list @task_pages, @tasks = paginate :tasks, :per_page => 50 @statuts=Statut.find_all @sorter = SortingHelper::Sorter.new(self, params[''sort''], params[''order''], ''id'', ''ASC'') search = {:id => @params[:id], :statut_id => @params[:statut_id], :description => @params[:description], :acteur => @params[:acteur]} if searc...
2007 May 19
0
database outputting results twice per page (using pagination + sorthelper)
...;>Hype</a> ( +45 ) or <a href="#">Drop</a> ( -7 ) <span id="subtext"> </span></span> </div></ div><br><br> <% end %> Controller ------------------------------ def upcoming @total = Albums.count @sorter = SortingHelper::Sorter.new self, %w(artist album date), @params[''sort''], @params[''order''], ''date'', ''ASC'' @albums_pages = Paginator.new self, Albums.count, 5, @params[''page''] @upcoming = Albums.find_all nil, @sorte...
2006 Apr 16
11
Best way to sort categories w/ pager
Ahoy, I made this pager, " def list @item_pages = Paginator.new self, Item.count, 10, @params[''page''] @items = Item.find :all, :conditions => "category_id = #{params[:condition]}", :limit => @item_pages.items_per_page, :offset => @item_pages.current.offset @categories = Category.find_all