Sha256: 813f095a3721687149a7a86798714440bc31b339e258dfe9ca3839d8a3a4a110

Contents?: true

Size: 443 Bytes

Versions: 5

Compression:

Stored size: 443 Bytes

Contents

class CarTableWithActions < DiningTable::Table
  def define
    column :brand
    column :number_of_doors
    actions :header => 'Action', :html => { :td => { class: 'left' }, :th => { class: :left } } do |object|
      h.link_to( 'Show', '#show' )  # doesn't do anything, simply verify that h helper is available
      action { |object_| h.link_to( 'Show', '#show' ) }
      action { |object_| h.link_to( 'Edit', '#edit' ) }
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

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