Module: DateSelectSeparator::ActionViewExtension

Defined in:
lib/date_select_separator/action_view_extension.rb

Instance Method Summary collapse

Instance Method Details

#select_monthObject



4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/date_select_separator/action_view_extension.rb', line 4

def select_month
  type = :month
  separator_options = @options[:use_separators]
  select_tag = super

  if use_separators?(type, separator_options)
    unless inline_separator?(separator_options)
      select_tag << separator_tag(type, separator_options)
    end

    if use_wrapper_select_tag?(separator_options)
      select_tag = wrapper_select_tag(select_tag, type, separator_options)
    end
  end

  select_tag
end