def select_options(pairs, current = nil, prompt = nil)
      pairs.unshift([prompt, '']) if prompt

      pairs.map { |label, value|
        tag(:option, label, :value => value, :selected => (current == value))
      }.join("\n")
    end
def select_options(pairs, current = nil, prompt = nil)
      pairs.unshift([prompt, '']) if prompt

      pairs.map { |label, value|
        tag(:option, label, :value => value, :selected => (current == value))
      }.join("\n")
    end
Accepts a list of pairs and produces option tags.

 @example

   select_options([['One', 1], ['Two', 2]])
   select_options([['One', 1], ['Two', 2]], 1)
   select_options([['One', 1], ['Two', 2]], 1, '- Choose -')

   # using it with the provided date helpers...
   select_options year_choices, 2010 # select 2010 as default
   select_options month_choices, 5 # select May as default
   select_options day_choices, 25 # select the 25th as default

 @param [Array] pairs a collection of label, value tuples.
 @param [Object] current the current value of this select.
 @param [#to_s] prompt a default prompt to place at the beginning
                of the list.