Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
V
VenJob
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
0
Merge Requests
0
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
Mai Hoang Thai Ha
VenJob
Commits
5c77f39a
Commit
5c77f39a
authored
Aug 16, 2021
by
Mai Hoang Thai Ha
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed controller
parent
87d06493
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
7 deletions
+5
-7
app/controllers/applies_controller.rb
+3
-6
app/views/user_mailer/apply_job.html.slim
+2
-1
No files found.
app/controllers/applies_controller.rb
View file @
5c77f39a
...
...
@@ -2,11 +2,8 @@ class AppliesController < ApplicationController
before_action
:load_job
,
only:
%i[new confirm create]
def
new
@apply
=
if
back?
ApplyJob
.
new
(
session
[
:apply_job
])
else
current_user
.
apply_jobs
.
build
end
build_params
=
session
[
:apply_job
]
if
use_apply_job_session?
@apply
=
current_user
.
apply_jobs
.
build
(
build_params
)
end
def
confirm
...
...
@@ -51,7 +48,7 @@ class AppliesController < ApplicationController
@current_user
||=
User
.
first
end
def
back
?
def
use_apply_job_session
?
request
.
referer
&
.
include?
(
'confirm'
)
&&
session
[
:apply_job
].
present?
end
end
app/views/user_mailer/apply_job.html.slim
View file @
5c77f39a
...
...
@@ -15,5 +15,6 @@ p
|
Full name:
#{
@apply
.
user_name
}
p
|
Email:
#{
@apply
.
email
}
p
CV:
p
|
CV:
#{
url_for
(
@apply
.
cv
)
}
p
Best,
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