Commit abd34948 by Thanh Hung Pham

Update mail content

parent b85a16cb
...@@ -19,7 +19,10 @@ class JobsController < ApplicationController ...@@ -19,7 +19,10 @@ class JobsController < ApplicationController
end end
def done def done
ApplyMailer.apply_mail(current_user).deliver @email = params[:email]
@fullname = params[:fullname]
@cv_link = 'link to download'
ApplyMailer.apply_mail(@email, @fullname, @cv_link).deliver
end end
def show def show
......
class ApplyMailer < ApplicationMailer class ApplyMailer < ApplicationMailer
default from: 'hungpt@zigexn.vn' default from: 'hungpt@zigexn.vn'
def apply_mail(current_user) def apply_mail(email, fullname, cv_link)
mail(to: current_user.email, subject: 'Thank you for apply with VeNJOB') @email = email
@fullname = fullname
@cv_link = cv_link
mail(to: email, subject: 'Thank you for apply with VeNJOB')
end end
end end
...@@ -4,6 +4,17 @@ ...@@ -4,6 +4,17 @@
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type' /> <meta content='text/html; charset=UTF-8' http-equiv='Content-Type' />
</head> </head>
<body> <body>
<h2>Hello</h2> <p> Dear <%= @fullname %></p>
<p> Thank you for applied with VenJOB. Your applied job's information is as follow: </p>
<p> Job title: <Job title> </p>
<p> Location: <Job location> </p>
<p> Company: <Company> </p>
<p> Your submitted information: </p>
<p> Full Name: <%= @fullname %> </p>
<p> Email: <%= @email %></p>
<p> CV Link: <%= @cv_link %></p>
<p> Best, </p>
</body> </body>
</html> </html>
...@@ -17,12 +17,20 @@ ...@@ -17,12 +17,20 @@
</div> </div>
</div> </div>
<div class="col-md-2"> <div class="col-md-2">
<%- if user_signed_in? -%>
<%= link_to 'Apply', jobs_apply_path, class: 'btn btn-primary' %> <%= link_to 'Apply', jobs_apply_path, class: 'btn btn-primary' %>
<%- else -%>
<%= link_to 'Apply', new_user_session_path, class: 'btn btn-primary' %>
<%- end -%>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="col-md-offset-3 "> <div class="col-md-offset-3 ">
<%- if user_signed_in? -%>
<%= link_to 'Apply', jobs_apply_path, class: 'btn btn-primary' %> <%= link_to 'Apply', jobs_apply_path, class: 'btn btn-primary' %>
<%- else -%>
<%= link_to 'Apply', new_user_session_path, class: 'btn btn-primary' %>
<%- end -%>
<%- if Favorite.where(user: current_user, job: @job).blank? -%> <%- if Favorite.where(user: current_user, job: @job).blank? -%>
<%- if user_signed_in? -%> <%- if user_signed_in? -%>
<%= link_to 'Favorite', '#', class: 'favorite_add btn btn-primary' %> <%= link_to 'Favorite', '#', class: 'favorite_add btn btn-primary' %>
......
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