How can i specify default time to datetime_select tag


#1

I want to specify a different default time to datetime_select tag how
can i do that.

also i was looking at rails helper code


module ActionView
module Helpers
module DateHelper

def to_datetime_select_tag(options = {})
defaults = { :discard_type => true }
options = defaults.merge(options)
options_with_prefix = Proc.new { |position|
options.merge(:prefix =>
“#{@object_name}[#{@method_name}(#{position}i)]”) }
datetime = options[:include_blank] ? (value || nil) : (value ||
Time.now)

    datetime_select  = select_year(datetime, 

options_with_prefix.call(1))
datetime_select << select_month(datetime,
options_with_prefix.call(2)) unless options[:discard_month]
datetime_select << select_day(datetime,
options_with_prefix.call(3)) unless options[:discard_day] ||
options[:discard_month]
datetime_select << ’ — ’ + select_hour(datetime,
options_with_prefix.call(4)) unless options[:discard_hour]
datetime_select << ’ : ’ + select_minute(datetime,
options_with_prefix.call(5)) unless options[:discard_minute] ||
options[:discard_hour]

    datetime_select
  end

i was wondering where did the variable value come from in follong line:

datetime = options[:include_blank] ? (value || nil) : (value ||
Time.now)