Active record request 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'

This does not give me the results that I want, unfortunately.

+3
source share
1 answer

I have added a parameter :per_page. Courtesy of brian.

+1
source

Source: https://habr.com/ru/post/1784171/


All Articles