Commit 75b7f917 by nnnghia98

using (&.)

parent 4ed4dbdc
......@@ -14,7 +14,7 @@
</dl>
<dl class="job_data_row">
<dt>Location</dt>
<dd><%= job.cities.first.try(:name) %></dd>
<dd><%= job&.cities&.first&.name %></dd>
</dl>
</div>
<button type="button" class="btn btn-outline-secondary">Favorite</button>
......
......@@ -14,7 +14,7 @@
</dl>
<dl class="job_data_row">
<dt>Location</dt>
<dd><%= latest_job.cities.first.try(:name) %></dd>
<dd><%= latest_job&.cities&.first&.name %></dd>
</dl>
</div>
</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