fireho/geopolitical

View on GitHub
app/views/geopolitical/cities/index.html.haml

Summary

Maintainability
Test Coverage
.container
  .row
    .page-header
      %h1.title Cities
      =# render "shared/filter"
      = link_to "New City", new_city_path
  .row
    .content
      %table.table
        %thead
          %tr
            %th Nome
            %th ZIP
            %th Region
            %th Nation
            %th Population
            %th
        %tbody
          - for city in @cities
            %tr
              %td
                = city.name
                = link_to city.slug , city
              %td= city.zip
              %td= city.region.name if city.region
              %td= city.nation.name
              %td= city.souls
              %td{:align => 'right'}
                = link_to 'Edit', edit_city_path(city)
                = link_to 'Destroy', city, :confirm => 'Destroy city?', :method => :delete

  .row
    .pagination= paginate @cities
  .row
    = link_to 'Back', root_path