techvision/brails4

View on GitHub
app/views/admin/feedbacks/index.html.haml

Summary

Maintainability
Test Coverage
- model_class = Feedback
.page-header
  %h1=t '.title', :default => model_class.model_name.human.pluralize.titleize
%table.table.table-striped
  %thead
    %tr
      %th= model_class.human_attribute_name(:id)
      %th= model_class.human_attribute_name(:name)
      %th= model_class.human_attribute_name(:email)
      %th= model_class.human_attribute_name(:country)
      %th= model_class.human_attribute_name(:text)
      %th=t '.actions', :default => t("helpers.actions")
  %tbody
    - @feedbacks.each do |feedback|
      %tr
        %td= link_to feedback.id, admin_feedback_path(feedback)
        %td= feedback.name
        %td= feedback.email
        %td= feedback.country
        %td= feedback.text