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
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
3
Merge Requests
3
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Xuan Trung Le
venjob
Commits
06e91ab0
Commit
06e91ab0
authored
Oct 25, 2017
by
Xuan Trung Le
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bugs
parent
f80735ef
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
9 additions
and
9 deletions
+9
-9
app/controllers/application_controller.rb
+2
-2
app/controllers/applies_controller.rb
+1
-1
app/controllers/jobs_controller.rb
+1
-1
app/mailers/apply_job_mailer.rb
+2
-2
config/routes.rb
+3
-3
No files found.
app/controllers/application_controller.rb
View file @
06e91ab0
class
ApplicationController
<
ActionController
::
Base
protect_from_forgery
with: :exception
helper_method
:clear_session
helper_method
:clear_session
_candidate
def
clear_session
def
clear_session
_candidate
session
[
:candidate
]
=
{}
end
end
app/controllers/applies_controller.rb
View file @
06e91ab0
...
...
@@ -34,7 +34,7 @@ class AppliesController < ApplicationController
if
@application
.
save
flash
[
:notice
]
=
'Congratulation! Job was successfully applied'
ApplyJobMailer
.
successful_email
(
@application
).
deliver_later
clear_session
clear_session
_candidate
end
end
...
...
app/controllers/jobs_controller.rb
View file @
06e91ab0
...
...
@@ -7,7 +7,7 @@ class JobsController < ApplicationController
end
def
show
clear_session
clear_session
_candidate
end
def
city
...
...
app/mailers/apply_job_mailer.rb
View file @
06e91ab0
class
ApplyJobMailer
<
ApplicationMailer
default
from:
'
from@example
.com'
default
from:
'
notify@venjob
.com'
def
successful_email
(
application
)
@application
=
application
mail
(
to:
@application
.
email
,
subject:
"Thank you for apply with VeNJOB"
)
mail
(
to:
@application
.
email
,
subject:
'Thank you for apply with VeNJOB'
)
end
end
config/routes.rb
View file @
06e91ab0
...
...
@@ -14,9 +14,9 @@ Rails.application.routes.draw do
end
resources
:applies
do
collection
do
get
'apply'
post
'confirm'
post
'done'
get
:apply
post
:confirm
post
:done
end
end
end
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