Class: Pageflow::Admin::EmbeddedIndexTable::SortColumnRecorder

Inherits:
Object
  • Object
show all
Defined in:
app/views/components/pageflow/admin/embedded_index_table.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeSortColumnRecorder

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

#columnsObject (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, options = {})
  if options[:sortable].is_a?(String) || options[:sortable].is_a?(Symbol)
    @columns << options[:sortable].to_s
  elsif options[:sortable] != false && name
    @columns << name.to_s
  end
end

#row_attributesObject



111
112
# File 'app/views/components/pageflow/admin/embedded_index_table.rb', line 111

def row_attributes
end