class TableSettings::DetailTable

Attributes

hash[R]

Public Class Methods

new() click to toggle source
# File lib/table_settings/detail_table.rb, line 5
def initialize
  @hash = {
      :only => [],
      :except => [],
      :global_format_method => {},
      :show_timestamps => false,
      :show_id => false
          }
end

Public Instance Methods

add(column) click to toggle source
# File lib/table_settings/detail_table.rb, line 23
def add(column)
  @hash[:only] << column
  self
end
caption(name) click to toggle source
# File lib/table_settings/detail_table.rb, line 48
def caption(name)
  @hash[:caption] = caption
  self
end
class_name(name) click to toggle source
# File lib/table_settings/detail_table.rb, line 43
def class_name(name)
  @hash[:class_name] = name
  self
end
css_class(name) click to toggle source
# File lib/table_settings/detail_table.rb, line 62
def css_class(name)
  @hash[:class] = name
  self
end
css_id(id) click to toggle source
# File lib/table_settings/detail_table.rb, line 58
def css_id(id)
  @hash[:id] = id
  self
end
exclude(column) click to toggle source
# File lib/table_settings/detail_table.rb, line 28
def exclude(column)
  @hash[:except] << column
  self
end
global_format_method(col_name, fnc_name) click to toggle source
# File lib/table_settings/detail_table.rb, line 53
def global_format_method(col_name, fnc_name)
  @hash[:global_format_method][col_name] = fnc_name
  self
end
show_id(boolean) click to toggle source
# File lib/table_settings/detail_table.rb, line 38
def show_id(boolean)
  @hash[:show_id] = boolean
  self
end
show_timestamps(boolean) click to toggle source
# File lib/table_settings/detail_table.rb, line 33
def show_timestamps(boolean)
  @hash[:show_timestamps] = boolean
  self
end