Sha256: 7fdacb82264477c55f29c4aa01605b6197b199041e326898cb4117c5166855a0
Contents?: true
Size: 615 Bytes
Versions: 14
Compression:
Stored size: 615 Bytes
Contents
module ActiveList class Table # Add a new method in Table which permit to define text_field columns def text_field(name, options={}) @columns << TextFieldColumn.new(self, name, options) end # Add a new method in Table which permit to define check_box columns def check_box(name, options={}) @columns << CheckBoxColumn.new(self, name, options) end end class FieldColumn < Column def header_code "#{@table.model.name}.human_attribute_name('#{@name}')" end end class TextFieldColumn < FieldColumn end class CheckBoxColumn < FieldColumn end end
Version data entries
14 entries across 14 versions & 1 rubygems