will_paginate上的活动记录查询

时间:2011-01-07 20:48:35

标签: activerecord ruby-on-rails-3 will-paginate

我想在will_paginate上使用此查询:

@courses = Course.where("id not in (?)", current_user.courses).paginate :page => params[:page], :order => 'code asc'

不幸的是,它没有得到我想要的结果。

1 个答案:

答案 0 :(得分:1)

我添加了:per_page参数。礼貌布莱恩。