Method: Ems::ApplicationHelper#index_table

Defined in:
app/helpers/ems/application_helper.rb

#index_table(headings) ⇒ Object



83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
# File 'app/helpers/ems/application_helper.rb', line 83

def index_table(headings)
  haml_tag :table,  :class=>"index_table", :paginator=>"true" do
    # Make the header
    haml_tag :thead do
      haml_tag :tr do
        headings.each do |h|
          haml_tag :th do
            haml_concat(h)
          end
        end
      end
    end
    # Make content
    haml_tag :tbody do
      yield
    end
  end
end