.user .addresses h1 = Comable.t('address_book') - if current_comable_user.errors.any? .errors ul - current_comable_user.errors.full_messages.each do |full_message| li = full_message - if current_comable_user.addresses.empty? .not_found p = Comable.t('not_found') - else .row .bill_address.col-sm-6 h2 = current_comable_user.class.human_attribute_name(:bill_address) - if current_comable_user.bill_address = render 'address', address: current_comable_user.bill_address - else .not_found p = Comable.t('not_found') .ship_address.col-sm-6 h2 = current_comable_user.class.human_attribute_name(:ship_address) - if current_comable_user.ship_address = render 'address', address: current_comable_user.ship_address - else .not_found p = Comable.t('not_found') .row .other_addresses h2 = Comable.t('other_addresses') ul.list-unstyled - current_comable_user.other_addresses.each do |address| li.col-sm-4 = render 'address', address: address .new_address h2 = Comable.t('new_address') = form_for current_comable_user, as: :user, url: comable.addresses_user_url, method: :put do |f| = f.fields_for :addresses, current_comable_user.addresses.build do |ff| = render 'comable/shared/address_form', address: ff .submit = f.submit Comable.t('actions.create')