Bharat Ahluwalia
2006-May-23 13:39 UTC
[Rails] Re: Wierd pagination problem - Unknown options:
> Unfortunately I still get the same error. Here is my code now (the > commented line works): > > def list > @upload_pages, @uploads = paginate(:uploads, :per_page => > 20, :order > => ''id'') > # @upload_pages, @uploads = paginate(:uploads, :per_page => 20) > endYou may have an older version, try using the order_by clause @upload_pages, @uploads = paginate(:uploads, :per_page => 20, :order_by => ''id'') If that works get the latest version, order_by is deprecated. Bharat
Bill Clinton
2006-May-23 22:00 UTC
[Rails] Re: Wierd pagination problem - Unknown options:
Bharat Ahluwalia wrote:>> Unfortunately I still get the same error. Here is my code now (the >> commented line works): >> >> def list >> @upload_pages, @uploads = paginate(:uploads, :per_page => >> 20, :order >> => ''id'') >> # @upload_pages, @uploads = paginate(:uploads, :per_page => 20) >> end > > You may have an older version, try using the order_by clause > @upload_pages, @uploads = paginate(:uploads, :per_page => 20, :order_by > => ''id'') > > If that works get the latest version, order_by is deprecated. > > BharatThat was it! I thought I had the latest version. I only started using RoR around 6 weeks ago and figured I got the most up to date version at that time. I''m not sure why I have an old version though. My versions show to be this: ruby 1.8.3 rubygems 0.8.11 rails-1.1.2 (at least that what it says it instals when I type "sudo gem install rails --include-dependencies") -- Posted via http://www.ruby-forum.com/.