Reputation: 26061
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
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