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

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

Overview

Since:

  • 12.2

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeSortColumnRecorder

Returns a new instance of SortColumnRecorder.

Since:

  • 12.2



104
105
106
# File 'app/views/components/pageflow/admin/embedded_index_table.rb', line 104

def initialize
  @columns = []
end

Instance Attribute Details

#columnsObject (readonly)

Since:

  • 12.2



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

Since:

  • 12.2



108
109
110
111
112
113
114
# File 'app/views/components/pageflow/admin/embedded_index_table.rb', line 108

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

Since:

  • 12.2



116
117
# File 'app/views/components/pageflow/admin/embedded_index_table.rb', line 116

def row_attributes
end