Class: TableSettings::CustomColumn
- Inherits:
-
Column
- Object
- Column
- TableSettings::CustomColumn
show all
- Defined in:
- lib/table_settings/table_column.rb
Instance Attribute Summary
Attributes inherited from Column
#index
Instance Method Summary
collapse
Methods inherited from Column
#column_hash, #css_class, #css_header_class, #csv_excluded, #editable, #filter_data, #filter_type, #format_method, #global_format_method, #inactive_filter, #initialize, #max_text_length, #non_breakable, #non_sortable, #sql_expression, #summarize_all, #summarize_page, #title
Instance Method Details
#callback_class(name) ⇒ Object
164
165
166
167
|
# File 'lib/table_settings/table_column.rb', line 164
def callback_class(name)
@column_hash[:column_class] = name
self
end
|
#callback_method(name) ⇒ Object
160
161
162
163
|
# File 'lib/table_settings/table_column.rb', line 160
def callback_method(name)
@column_hash[:column_method] = name
self
end
|
#callback_params(params) ⇒ Object
155
156
157
158
|
# File 'lib/table_settings/table_column.rb', line 155
def callback_params(params)
@column_hash[:column_params] = params
self
end
|
#params(name, label, column_method, column_class = nil, column_params = nil) ⇒ Object
142
143
144
145
146
147
148
149
150
151
152
153
154
|
# File 'lib/table_settings/table_column.rb', line 142
def params( name, label, column_method, column_class = nil, column_params = nil)
@column_hash = {
:name => name,
:label => label,
:column_method => column_method,
:filter => :none
}
@column_hash[:column_class] = column_class unless column_class.nil?
@column_hash[:column_params] = column_params unless column_params.nil?
self
end
|