<%# A VIN that can be clicked (or Enter/Space) to copy it. 17-character VINs show the last 8 in bold, which is what dealerships ask for when ordering parts; older or short VINs are shown plain. The copy script is in vehicles/_copy_vin_script. locals: vin %> <% if vin.present? %> <% vin = vin.to_s %>
<% if vin.length == 17 %><%= vin[0, 9] %><%= vin[9, 8] %><% else %><%= vin %><% end %>
<% end %>