<% if trip.distance.present? %> <%= trip.distance %> <%= DISTANCE_UNIT %> <% else %> Calculating... <% end %>