Class: Pageflow::Admin::EmbeddedIndexTable::SortColumnRecorder
- Inherits:
-
Object
- Object
- Pageflow::Admin::EmbeddedIndexTable::SortColumnRecorder
- Defined in:
- app/views/components/pageflow/admin/embedded_index_table.rb
Overview
Instance Attribute Summary collapse
- #columns ⇒ Object readonly
Instance Method Summary collapse
- #column(name = nil, options = {}) ⇒ Object
-
#initialize ⇒ SortColumnRecorder
constructor
A new instance of SortColumnRecorder.
- #row_attributes ⇒ Object
Constructor Details
#initialize ⇒ SortColumnRecorder
Returns a new instance of SortColumnRecorder.
104 105 106 |
# File 'app/views/components/pageflow/admin/embedded_index_table.rb', line 104 def initialize @columns = [] end |
Instance Attribute Details
#columns ⇒ Object (readonly)
102 103 104 |
# File 'app/views/components/pageflow/admin/embedded_index_table.rb', line 102 def columns @columns end |
Instance Method Details
#column(name = nil, options = {}) ⇒ Object
108 109 110 111 112 113 114 |
# File 'app/views/components/pageflow/admin/embedded_index_table.rb', line 108 def column(name = nil, = {}) if [:sortable].is_a?(String) || [:sortable].is_a?(Symbol) @columns << [:sortable].to_s elsif [:sortable] != false && name @columns << name.to_s end end |
#row_attributes ⇒ Object
116 117 |
# File 'app/views/components/pageflow/admin/embedded_index_table.rb', line 116 def row_attributes end |