Displaying 2 results from an estimated 2 matches for "default_date_options".
2006 Jun 02
6
overriding constants
...}.freeze unless const_defined?(:DEFAULT_FIELD_OPTIONS)
DEFAULT_RADIO_OPTIONS = { }.freeze unless const_defined?(:DEFAULT_RADIO_OPTIONS)
DEFAULT_TEXT_AREA_OPTIONS = { "cols" => 40, "rows" => 20 }.freeze unless const_defined?(:DEFAULT_TEXT_AREA_OPTIONS)
DEFAULT_DATE_OPTIONS = { :discard_type => true }.freeze unless const_defined?(:DEFAULT_DATE_OPTIONS)
but if I add a simple declaration in my environment.rb, nothing seems to happen (even after webserver reboot):
DEFAULT_FIELD_OPTIONS = { "size" => 30, "class" => "text" }
DEF...
2007 Jan 24
0
ActionView::Helpers::InstanceTag#to_date_tag help
I''m trying to read through the code, hoping to find a way to custom
style select boxes for a date_select and can''t figure out this code.
Any help appreciated:
<code>
def to_date_tag()
defaults = DEFAULT_DATE_OPTIONS.dup
date = value(object) || Date.today
options = Proc.new { |position| defaults.merge(:prefix =>
"#{@object_name}[#{@method_name}(#{position}i)]") }
html_day_select(date, options.call(3)) +
html_month_select(date, options.call(2)) +
html_yea...