我正在使用 will_paginate 插件,仅当我在服务器上而不是本地运行时才会收到以下错误:
undefined method `total_pages' for []:Array
Extracted source (around line #8):
5: <% session[:page] = params[:page] %>
6: <h2>Previous Scenario</h2>
7: <% end %>
8: <%= will_paginate @scenarios, :next_label => 'Older', :prev_label => 'Newer' %>
9: <div class="box">
10: <% for scenario in @scenarios %>
11: <% @created = scenario.created_at %>
有任何想法吗?