Class: Decidim::DateRangeCell

Inherits:
ViewModel
  • Object
show all
Includes:
IconHelper
Defined in:
decidim-core/app/cells/decidim/date_range_cell.rb

Overview

This cell renders a date or a date range the `model` is expected to be an hash with two keys:

`start` is the starting datetime
`end` is the ending datetime

both are optional

start: model.start_time,
end: model.end_time

Instance Method Summary collapse

Methods included from IconHelper

#component_icon, #manifest_icon, #resource_icon

Instance Method Details

#showObject


18
19
20
21
22
# File 'decidim-core/app/cells/decidim/date_range_cell.rb', line 18

def show
  return unless start_time && end_time

  render :show
end