<% @passports.each do |passport| %> <% end %>
<%= Passport.human_attribute_name :id %> <%= PassportMap.human_attribute_name :surname %> <%= PassportMap.human_attribute_name :given_name %> <%= PassportMap.human_attribute_name :patronymic %> <%= PassportMap.human_attribute_name :date_of_birth %> <%= PassportMap.human_attribute_name :place_of_birth %>
<%= passport.id %> <%= truncate passport.passport_map&.surname, length: 15 %> <%= truncate passport.passport_map&.given_name, length: 15 %> <%= truncate passport.passport_map&.patronymic, length: 15 %> <% if passport.passport_map %> <%= localize passport.passport_map.date_of_birth %> <% end %> <%= truncate passport.passport_map&.place_of_birth, length: 15 %> <% if policy(passport).show? %> <%= link_to passport_path(passport), role: :button, class: 'btn btn-light btn-sm' do %> <% end %> <% end %>