Module: Phlexi::Table::Components::Concerns::DisplaysData

Extended by:
ActiveSupport::Concern
Included in:
Phlexi::Table::Components::Column
Defined in:
lib/phlexi/table/components/concerns/displays_data.rb

Instance Method Summary collapse

Instance Method Details

#data_cell(wrapped_object) ⇒ Object

Raises:

  • (NotImplementedError)


10
11
12
# File 'lib/phlexi/table/components/concerns/displays_data.rb', line 10

def data_cell(wrapped_object)
  raise NotImplementedError, "#{self.class} must implement #data_cell"
end

#data_cell_attributes(wrapped_object) ⇒ Object



14
15
16
17
18
19
20
21
22
# File 'lib/phlexi/table/components/concerns/displays_data.rb', line 14

def data_cell_attributes(wrapped_object)
  attributes = @attributes.dup
  attributes[:class] = tokens(
    attributes[:class],
    themed(:"align_#{alignment}"),
    themed(:"#{type}_column")
  )
  attributes
end