Sha256: 845921d466fabc0f22449709f06fd64d53072d282082eac4ca4485ba79e13188

Contents?: true

Size: 432 Bytes

Versions: 5

Compression:

Stored size: 432 Bytes

Contents

class CarTableWithOptions < DiningTable::Table
  def define
    column :brand, :html => { :td => { class: 'center' }, :th => { class: :center } } do |object|
      object.brand.upcase
    end
    column :stock, :html => { :td => { class: 'left' }, :th => { class: :left } }
    column :launch_date if options[:with_normal_launch_date]
    column :launch_date, :class => DateColumn if options[:with_date_column_launch_date]
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
dining-table-1.1.3 spec/tables/car_table_with_options.rb
dining-table-1.1.2 spec/tables/car_table_with_options.rb
dining-table-1.1.1 spec/tables/car_table_with_options.rb
dining-table-1.1.0 spec/tables/car_table_with_options.rb
dining-table-1.0.0 spec/tables/car_table_with_options.rb