| Class | Opensteam::Helper::ConfigurableTable::ConfigTable |
| In: |
lib/opensteam/helper/configurable_table.rb
|
| Parent: | Object |
ConfigTable Holds all the Columns defined fot the Configurable-Table
| assoc_names | [RW] | |
| assocs | [RW] | |
| columns | [RW] | |
| model | [RW] | |
| table_id | [RW] |
# File lib/opensteam/helper/configurable_table.rb, line 124
124: def initialize(mdl)
125: @columns = []
126: @model = mdl
127: @table_id = "#{@model.table_name}_configured_table"
128: @assocs = mdl.reflect_on_all_associations
129: @assoc_names = @assocs.collect(&:name)
130: end
# File lib/opensteam/helper/configurable_table.rb, line 137
137: def column( id, *args )
138: @columns << Column.new( id.to_sym, self, *args )
139: end
# File lib/opensteam/helper/configurable_table.rb, line 145
145: def default_sort ; get_column( @default_sort ) ; end
# File lib/opensteam/helper/configurable_table.rb, line 133
133: def default_sort_col( id )
134: @default_sort = id.to_sym
135: end