Sha256: c0ef78811b459125c243a5c70998881e20da86c99ee6dd2b5a2166707bb2c1c5

Contents?: true

Size: 577 Bytes

Versions: 12

Compression:

Stored size: 577 Bytes

Contents

module Trestle
  class Table
    class SelectColumn
      attr_reader :table

      def initialize(table)
        @table = table
      end

      def renderer(template)
        Renderer.new(self, template)
      end

      class Renderer < Column::Renderer
        def header
          @template.check_box_tag ""
        end

        def content(instance)
          @template.check_box_tag "selected[]", instance.to_param, false, id: nil
        end

        def classes
          "select-row"
        end

        def data
          {}
        end
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
trestle-0.8.12 lib/trestle/table/select_column.rb
trestle-0.8.11 lib/trestle/table/select_column.rb
trestle-0.8.10 lib/trestle/table/select_column.rb
trestle-0.8.9 lib/trestle/table/select_column.rb
trestle-0.8.8 lib/trestle/table/select_column.rb
trestle-0.8.7 lib/trestle/table/select_column.rb
trestle-0.8.6 lib/trestle/table/select_column.rb
trestle-0.8.5 lib/trestle/table/select_column.rb
trestle-0.8.4 lib/trestle/table/select_column.rb
trestle-0.8.3 lib/trestle/table/select_column.rb
trestle-0.8.2 lib/trestle/table/select_column.rb
trestle-0.8.0 lib/trestle/table/select_column.rb