Module: ActionTabler::DataTables::DisplayHandler
- Included in:
- ActionTabler::DataTables
- Defined in:
- lib/action_tabler/data_tables/display_handler.rb
Instance Method Summary collapse
- #columns ⇒ Object
- #table_class ⇒ Object
- #table_definition(params, source_url) ⇒ Object
-
#table_id ⇒ Object
table_definition.
Instance Method Details
#columns ⇒ Object
20 21 22 |
# File 'lib/action_tabler/data_tables/display_handler.rb', line 20 def columns @columns end |
#table_class ⇒ Object
16 17 18 |
# File 'lib/action_tabler/data_tables/display_handler.rb', line 16 def table_class @table_class end |
#table_definition(params, source_url) ⇒ Object
4 5 6 7 8 9 10 |
# File 'lib/action_tabler/data_tables/display_handler.rb', line 4 def table_definition(params, source_url) = {:bProcessing => true, :bServerSide => true, :sAjaxSource => source_url}.update(@table_options) [:fnServerParams] ||= passed_parameters(exitisting_conditions(params)) [:aoColumnDefs] ||= column_definitions "{" + .collect{|k,v| render_attribute(k, v)}.compact.join(", \n") + "}" end |
#table_id ⇒ Object
table_definition
12 13 14 |
# File 'lib/action_tabler/data_tables/display_handler.rb', line 12 def table_id @model.name.underscore + "_table" end |