Commit 01e1db43 by Ngô Trung Hưng

change file name job_business -> job_history

parent 4720630b
Pipeline #998 canceled with stages
in 0 seconds
......@@ -13,7 +13,7 @@ class JobController < ApplicationController
@job = Job.find(params[:id]).decorate
return render 'error/fage_not_found' if @job.blank?
JobBusiness.add_job_to_history(@job.id, current_user) if user_signed_in?
JobHistory.add_job_to_history(@job.id, current_user) if user_signed_in?
cities = @job.cities.first
industries = @job.industries.first
add_breadcrumb t('controller.job.detail.home'), root_path
......
# frozen_string_literal: true
class JobBusiness
class JobHistory
def self.add_job_to_history(job_id, current_user)
current_user.histories.find_or_create_by(job_id: job_id)
counter_history = current_user.histories.count
......
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