class TableSettings::StandardColumn

Public Instance Methods

params(name, label, table) click to toggle source
# File lib/table_settings/table_column.rb, line 172
def params(name, label, table)

  @column_hash = {
      :name   => name,
      :label  => label,
      :table  => table,
      :filter => :find
  }

  self
end
set_css_class_from_type(model) click to toggle source
# File lib/table_settings/table_column.rb, line 191
def set_css_class_from_type(model)
  column_params = model.columns_hash[@column_hash[:name]]
  case column_params.type
    when :boolean then css_class("boolean")
    when :datetime then css_class("datetime")
    when :string then css_class("string")
    when :decimal then css_class("decimal")
    else nil
  end
end
table(name) click to toggle source

Table for column

# File lib/table_settings/table_column.rb, line 185
def table(name)
  @column_hash[:table] = name
  self
end