Class: Pageflow::Admin::EmbeddedIndexTable::SortColumnRecorder
- Inherits:
-
Object
- Object
- Pageflow::Admin::EmbeddedIndexTable::SortColumnRecorder
- Defined in:
- app/views/components/pageflow/admin/embedded_index_table.rb
Instance Attribute Summary collapse
-
#columns ⇒ Object
readonly
Returns the value of attribute columns.
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.
99 100 101 |
# File 'app/views/components/pageflow/admin/embedded_index_table.rb', line 99 def initialize @columns = [] end |
Instance Attribute Details
#columns ⇒ Object (readonly)
Returns the value of attribute columns.
97 98 99 |
# File 'app/views/components/pageflow/admin/embedded_index_table.rb', line 97 def columns @columns end |
Instance Method Details
#column(name = nil, options = {}) ⇒ Object
103 104 105 106 107 108 109 |
# File 'app/views/components/pageflow/admin/embedded_index_table.rb', line 103 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
111 112 |
# File 'app/views/components/pageflow/admin/embedded_index_table.rb', line 111 def row_attributes end |