podemos-info/census

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

Summary

Maintainability
Test Coverage
# frozen_string_literal: true

table_for(person.last_procedures, row_class: ->(record) { record.state }) do
  column do |procedure|
    procedure.link(procedure.created_at.to_date.to_s(:db))
  end
  column do |procedure|
    span procedure.type_name
    span procedure.summary
  end
end
ul do
  li link_to t("census.people.view_procedures", count: person.count_procedures), person_procedures_path(person_id: person.id)
end