Class: Koi::Tables::BodyCellComponent

Inherits:
Katalyst::Tables::BodyCellComponent
  • Object
show all
Defined in:
app/components/koi/tables/body_cell_component.rb

Overview

Custom body cell component, in order to override the content

Instance Method Summary collapse

Instance Method Details

#before_renderObject



7
8
9
10
# File 'app/components/koi/tables/body_cell_component.rb', line 7

def before_render
  # fallback if no content block is given
  with_content(rendered_value) unless content?
end

#rendered_valueObject



12
13
14
# File 'app/components/koi/tables/body_cell_component.rb', line 12

def rendered_value
  value.to_s
end

#to_sObject



16
17
18
# File 'app/components/koi/tables/body_cell_component.rb', line 16

def to_s
  rendered_value
end