这是错误和我的代码。我正在使用Kaminari
Error: undefined method `model_name' for #<Array:0x0000001d5abeb0>
73: <%= page_entries_info(@communities).html_safe %>
看法
<%= page_entries_info(@communities).html_safe %>
社区控制器
更新*这就是我现在获取的方式
@search = Community.search do
fulltext params[:search]
with(:location_id, params[:location]) if params[:location].to_i >0
with(:type_id, params[:type]) if params[:type].to_i >0
order_by :cached_votes_up, :desc
paginate :page => params[:page], :per_page => 10
end
@communities = @search.results