Commit c4bc73b9 by nnnghia98

check if user has signed in

parent b706c46a
......@@ -32,7 +32,7 @@
<div class="job_detail_button">
<%= link_to "Favorite", "#", class: "btn btn-primary float-right" %>
<% if UserJob.find_by(user_id: current_user.id, job_id: @job.id) %>
<% if user_signed_in? && UserJob.find_by(user_id: current_user.id, job_id: @job.id) %>
<button type="button" class="btn btn-primary float-right mx-3" disabled>Apply</button>
<% else %>
<%= link_to "Apply", apply_path(job_id: @job.id), class: "btn btn-primary float-right mx-3" %>
......
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