app/views/services/show.html.erb
<%= render "search_form" %>
<h2>
<%= @service.name %>
</h2>
<p>
<%= simple_format auto_link @service.description %>
</p>
<p>
<b>Service location:</b>
<%= "#{ @service.address }, #{ @service.postcode }" %>
</p>
<p>
<strong>Telephone:</strong>
<%= @service.telephone %>
</p>
<p>
<strong>Email:</strong>
<a href="mailto:<%= @service.email %>"><%= @service.email %></a>
</p>
<p>
<strong>Website:</strong>
<%= sanitize(link_to sanitize(@service.website), sanitize(@service.website), {:target => '_blank'}) %>
</p>
<% if @service.where_we_work.present? %>
<p>
<strong>Where we work:</strong>
<%= @service.where_we_work %>
</p>
<%end%>
<% if @service.activity_type.present? %>
<p>
<strong>Activity type:</strong>
<%= @service.activity_type %>
</p>
<%end%>
<% if @service.beneficiaries.present? %>
<p>
<strong>Beneficiaries:</strong>
<%= @service.beneficiaries %>
</p>
<%end%>
<p>
<strong>Self Care Categories:</strong>
<%= @service.self_care_categories.pluck(:name).join(', ') %>
</p>
<% render partial: 'shared/map_scripts', locals: {markers: @markers} %>