Sha256: 2b6f8b43831e4e6a1e8da6633caf261c084060ed51e203757da783b775eda162

Contents?: true

Size: 241 Bytes

Versions: 7

Compression:

Stored size: 241 Bytes

Contents

class CarTableWithFooter < DiningTable::Table
  def define
    column :brand
    column :number_of_doors, :footer => 'Total'
    column :stock, :footer => lambda { h.link_to("Total: #{ collection.map(&:stock).inject(&:+) }", '#') }
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
dining-table-1.1.3 spec/tables/car_table_with_footer.rb
dining-table-1.1.2 spec/tables/car_table_with_footer.rb
dining-table-1.1.1 spec/tables/car_table_with_footer.rb
dining-table-1.1.0 spec/tables/car_table_with_footer.rb
dining-table-1.0.0 spec/tables/car_table_with_footer.rb
dining-table-0.2.1 spec/tables/car_table_with_footer.rb
dining-table-0.2.0 spec/tables/car_table_with_footer.rb