method
separator
rails latest stable - Class:
ActionView::Helpers
Method deprecated or moved
This method is deprecated or moved on the latest stable version. The last existing version (v6.1.7.7) is shown here.
separator(type)private
Returns the separator for a given datetime component.
# File actionview/lib/action_view/helpers/date_helper.rb, line 1148
def separator(type)
return "" if @options[:use_hidden]
case type
when :year, :month, :day
@options[:"discard_#{type}"] ? "" : @options[:date_separator]
when :hour
(@options[:discard_year] && @options[:discard_day]) ? "" : @options[:datetime_separator]
when :minute, :second
@options[:"discard_#{type}"] ? "" : @options[:time_separator]
end
end Related methods
- Instance methods
- select_month
- select_year
- Class methods
- eager_load!
- Private methods
-
build_hidden -
build_options -
build_options_and_select -
build_select -
build_selects_from_types -
build_year_options -
css_class_attribute -
date_order -
input_id_from_type -
input_name_from_type -
month_name -
month_names -
prompt_option_tag -
separator -
set_day_if_discarded -
translated_date_order -
translated_month_names -
year_name