daniel
daniel

Reputation: 3115

Active record query on will_paginate

I want to use this query on will_paginate:

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

It doesn't get me the results I want, unfortunately.

Upvotes: 3

Views: 1394

Answers (1)

daniel
daniel

Reputation: 3115

I added the :per_page parameter. Courtesy brian.

Upvotes: 1

Related Questions