为railstutorial编写sample_app并出现下一个错误。
我已将<%= will_paginate @microposts %>
添加到用户个人资料视图,@microposts = @user.microposts.paginate(:page => params[:page])
添加到UsersController
> NoMethodError (protected method `wp_parse_options' called for #<Class:0x007fde66015a80>):
app/controllers/users_controller.rb:17:in `show'
问题出在哪里?
答案 0 :(得分:4)
尝试gem 'will_paginate', '~> 3.0'
并再次捆绑安装,重启服务器。为了它的地狱paginate(page: params[:page], per_page: 15)