Commit d927cd18 by nnnghia98

paginate applied jobs

parent 8c905bbe
......@@ -19,7 +19,8 @@ class Users::AdminsController < ApplicationController
applied_jobs = user.jobs
applied_jobs.page(params[:page]).per(Settings.job.per_page)
else
Job.joins(:user_jobs).where.not(user_jobs: { applied_at: nil}).distinct
applied_jobs = Job.joins(:user_jobs).where.not(user_jobs: { applied_at: nil}).distinct
applied_jobs.page(params[:page]).per(Settings.job.per_page)
end
end
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment