I would like to wrap a conditional link_to around some code that only renders the link if the following condition is met: IF current_user.type == 'Agent'
. The content within the condition still needs to be rendered regardless.
My current block looks like this:
<% @jobs_published.in_groups_of(3, false) do |job| %>
<div class="row">
<%= link_to "/job/#{job.id}" do %>
<div class="panel">
<h4>Job</h4>
<p><%= job.suburb %></p>
<p><%= job.street_name %></p>
<p><%= job.post_cide %></p>
</div>
<% end %>
</div>
<% end %>