earsonheart
earsonheart

Reputation: 1052

will_paginate NoMethodError

Writing sample_app for railstutorial and having next error.

I've added <%= will_paginate @microposts %> to the user profile View and @microposts = @user.microposts.paginate(:page => params[:page]) to UsersController

> NoMethodError (protected method `wp_parse_options' called for #<Class:0x007fde66015a80>):
  app/controllers/users_controller.rb:17:in `show'

Where is the problem?

Upvotes: 3

Views: 992

Answers (1)

Jonathan
Jonathan

Reputation: 11504

Try gem 'will_paginate', '~> 3.0' and bundle install again, restart server. Give paginate some extra params just for the hell of it paginate(page: params[:page], per_page: 15)

Upvotes: 4

Related Questions