Antarr Byrd
Antarr Byrd

Reputation: 26061

Using Railslist, on rails3

I'm trying to modify railslist to work with Rails 3. I keep getting this error when trying to view /classifieds

TypeError (can't convert nil into Array)
app/controller/classifieds_controller.rb:in 'index'

def index
    @classifieds = Classified.paginate :page => params[:page], :order => "created_at DESC"  
    render :layout => 'main'
end

Upvotes: 0

Views: 107

Answers (1)

Andrew Marshall
Andrew Marshall

Reputation: 96904

You need to use a pre-release version of will_paginate if you're using Rails 3. Put the following in your Gemfile in place of what you had for will_paginate before:

gem "will_paginate", "~> 3.0.pre2"

Upvotes: 1

Related Questions