Commit 51bff2d7 by thanhnd

fix review 20200313 2

parent 7f8e4bf7
Pipeline #511 failed with stages
in 0 seconds
class JobsController < ApplicationController
def show
#@job_detail = Job.find_by_id(params[:id]) > 0 ? Job.find_by_id(params[:id]) : 1
job_id = params[:id].to_i > 0 ? params[:id].to_i : 1
@job_detail = Job.find_by_id(job_id)
@job_detail = Job.find_by_id(params[:id])
end
def index
......
......@@ -9,6 +9,11 @@
</div>
<div id="job_detail"class="container p-5 my-2 bg-secondary text-white">
<% if @job_detail.nil? == true %>
<div> This id is not available. </div>
<% else %>
<ul class="breadcrumb">
<li><a href="#">Top</a></li>
<li><a href="#">City</a></li>
......@@ -16,7 +21,6 @@
<li><%= @job_detail.job_name %></li>
</ul>
<font color="red"><b><label > Job Detail:</label></b></font>
<ul>
<li><%= @job_detail.job_name %></li>
......@@ -26,10 +30,9 @@
<li ><span class="text"><%= @job_detail.description %></span>
</li>
</ul>
<button class="button button1">Apply</button>
<button class="button button2">Favorites</button>
<% end %>
</div>
......
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