Class: Clot::DatetimeSelect
- Inherits:
-
ModelMultiDateTag
- Object
- Liquid::Tag
- ClotTag
- MultiDateTag
- ModelMultiDateTag
- Clot::DatetimeSelect
- Defined in:
- lib/clot/model_date_tags.rb
Constant Summary
Constants inherited from ClotTag
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
Methods included from TagHelper
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
72 73 74 75 76 77 78 79 |
# File 'lib/clot/model_date_tags.rb', line 72 def render_nested(context) @time = @value_string || Time.zone.now date_units = ['year', 'month', 'day'] time_units = ["hour", "minute"] time_result = render_units(time_units, context, @time_separator) date_result = render_units(date_units, context, @date_separator) date_result + @datetime_separator.to_s + time_result end |