Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
V
venjob_nth
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
3
Merge Requests
3
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ngô Trung Hưng
venjob_nth
Commits
01e1db43
Commit
01e1db43
authored
Aug 24, 2020
by
Ngô Trung Hưng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change file name job_business -> job_history
parent
4720630b
Pipeline
#998
canceled with stages
in 0 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
app/controllers/job_controller.rb
+1
-1
lib/business/job_history.rb
+1
-1
No files found.
app/controllers/job_controller.rb
View file @
01e1db43
...
...
@@ -13,7 +13,7 @@ class JobController < ApplicationController
@job
=
Job
.
find
(
params
[
:id
]).
decorate
return
render
'error/fage_not_found'
if
@job
.
blank?
Job
Business
.
add_job_to_history
(
@job
.
id
,
current_user
)
if
user_signed_in?
Job
History
.
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
...
...
lib/business/job_
business
.rb
→
lib/business/job_
history
.rb
View file @
01e1db43
# frozen_string_literal: true
class
Job
Business
class
Job
History
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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment