Commit a772e138 by Tô Ngọc Ánh

check user_signed_in at applied job button

parent f7895837
Pipeline #952 failed with stages
in 0 seconds
......@@ -31,7 +31,7 @@
<%= @job.description.html_safe %>
</div>
<div class="col-2">
<% is_not_applied = current_user.applied_jobs.find_by(job_id: @job.id).blank? %>
<% is_not_applied = user_signed_in? ? current_user.applied_jobs.find_by(job_id: @job.id).blank? : true %>
<%= link_to_if is_not_applied, 'Apply Now', new_applied_job_path(job_id: @job.id), class: 'btn btn-outline-success btn-lg' do %>
<%= link_to 'Apply Now', '#', class: 'btn btn-outline-secondary btn-lg disabled' %>
<% end %>
......
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