Class: Clot::DateSelect

Inherits:
ModelMultiDateTag show all
Defined in:
lib/clot/model_date_tags.rb

Constant Summary

Constants inherited from ClotTag

ClotTag::Syntax

Instance Method Summary collapse

Methods inherited from ModelMultiDateTag

#fill_zeros, #get_unit_order, #set_unit

Methods included from ModelTag

#render, #set_primary_attributes

Methods inherited from MultiDateTag

#personal_attributes, #render, #render_units, #set_primary_attributes, #set_unit, #time_unit

Methods inherited from ClotTag

#initialize, #render

Methods included from TagHelper

#resolve_value, #split_params

Methods included from AttributeSetter

#personal_attributes, #set_attributes, #set_primary_attributes

Constructor Details

This class inherits a constructor from Clot::ClotTag

Instance Method Details

#render_nested(context) ⇒ Object



61
62
63
64
65
66
67
68
# File 'lib/clot/model_date_tags.rb', line 61

def render_nested(context)
  @time = @value_string || Time.zone.now
  date_units = @order || ['year', 'month', 'day']
  @discard_day && date_units.delete("day")

  date_result = render_units(date_units, context, @date_separator)
  date_result
end