你好伙计我在rails 3中遇到了will_paginate的问题,我在我的constroller里有这个
@posts = Post.paginate(:all,
:include => [:author, :categories],
:conditions=>"status = 'published'",
:order=>"blog_posts.created_at DESC",
:per_page => 1, :page => params[:page])
Run Code Online (Sandbox Code Playgroud)
和@%= will_paginate @posts%>在我的视图中,但我得到此错误无法将nil不断转换为数组.
谁能帮我 ?
提前致谢