Commit de91696f by nnnghia98

refactoring code

parent 14ac61dc
...@@ -49,8 +49,7 @@ class JobsController < ApplicationController ...@@ -49,8 +49,7 @@ class JobsController < ApplicationController
end end
def apply_available def apply_available
binding.pry user_jobs.find_by(job_id: @job_id, user_id: @user.id)
user_jobs.where.not(applied_at: nil).find_by(job_id: @job_id, user_id: @user.id)
end end
private private
......
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