Module: PunctualDateSelect::Helper::Builder

Defined in:
lib/punctual_date_select/helper.rb

Instance Method Summary collapse

Instance Method Details

#punctual_date_select(method, options = {}, html_options = {}) ⇒ Object



4
5
6
7
8
# File 'lib/punctual_date_select/helper.rb', line 4

def punctual_date_select(method, options={}, html_options={})
  value = object.send(method)
  value ||= Date.current if options[:prompt].nil?
  @template.select_date(value, {:prefix => "#{@object_name}[#{method}]"}.merge(options), html_options)
end