Commit 9efeecec by Thanh Hung Pham

fix update history

parent 5ca75397
......@@ -5,7 +5,8 @@ class JobsController < ApplicationController
def detail
@job = Job.find(params[:id])
History.new(user: current_user, job: @job).save if History.where(user: current_user, job: @job).blank?
@history = History.find_or_create_by(user: current_user, job: @job)
@history.touch(:updated_at)
end
def apply
......
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