Commit abd34948 by Thanh Hung Pham

Update mail content

parent b85a16cb
......@@ -19,7 +19,10 @@ class JobsController < ApplicationController
end
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
def show
......
class ApplyMailer < ApplicationMailer
default from: 'hungpt@zigexn.vn'
def apply_mail(current_user)
mail(to: current_user.email, subject: 'Thank you for apply with VeNJOB')
def apply_mail(email, fullname, cv_link)
@email = email
@fullname = fullname
@cv_link = cv_link
mail(to: email, subject: 'Thank you for apply with VeNJOB')
end
end
......@@ -4,6 +4,17 @@
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type' />
</head>
<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>
</html>
......@@ -17,12 +17,20 @@
</div>
</div>
<div class="col-md-2">
<%= link_to 'Apply', jobs_apply_path, class: 'btn btn-primary' %>
<%- if user_signed_in? -%>
<%= 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 class="row">
<div class="col-md-offset-3 ">
<%= link_to 'Apply', jobs_apply_path, class: 'btn btn-primary' %>
<%- if user_signed_in? -%>
<%= 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 user_signed_in? -%>
<%= 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