podemos-info/census

View on GitHub
app/views/people/_show_small.arb

Summary

Maintainability
Test Coverage
# frozen_string_literal: true

context.instance_eval do
  panel title do
    changes_table_for(resource, changes: local_assigns[:changes], mode: local_assigns[:mode]) do
      chrow :first_name
      chrow :last_name1
      chrow :last_name2
      chrow :document_type, &:document_type_name
      chrow :document_id
      chrow :document_scope do
        resource.full_document_scope
      end
      chrow :born_at
      chrow :gender, &:gender_name
      chrow :address
      chrow :address_scope, change_field: :address_scope_id do
        resource.full_address_scope
      end
      chrow :postal_code
      chrow :email do
        resource.email_link
      end
      chrow :phone
    end
  end
end