Class: Decidim::DateRangeCell

Inherits:
ViewModel
  • Object
show all
Defined in:
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

Instance Method Details

#showObject



16
17
18
19
20
# File 'app/cells/decidim/date_range_cell.rb', line 16

def show
  return unless start_time && end_time

  render :show
end