Displaying 3 results from an estimated 3 matches for "default_text_area_opt".
2006 Jun 02
6
overriding constants
...odoc:
include Helpers::TagHelper
attr_reader :method_name, :object_name
DEFAULT_FIELD_OPTIONS = { "size" => 30 }.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 seem...
2006 Sep 04
1
Overriding ActionView::Helpers::InstanceTag::DEFAULT_TEXT_AREA_OPTIONS
What is the best way to override some of the FormHelper default
options? Right now I''m adding this to the beginning of my
environment.rb:
ActionView::Helpers::InstanceTag::DEFAULT_TEXT_AREA_OPTIONS = { "cols"
=> 80, "rows" => 5 }
Is that the way it''s supposed to be done?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this...
2007 Feb 28
1
Rails 1.2 Bug (?): to_text_area_tag
...to split the string and determine the cols/rows.
I hope this is clear and helps somewhat. I''m not sure that this is the
proper solution, but it does seem to be a legitimate issue. Below is
the code for my new to_text_area_tag:
def to_text_area_tag(options = {})
options =
DEFAULT_TEXT_AREA_OPTIONS.merge(options.stringify_keys)
add_default_name_and_id(options)
if size = options.delete("size")
if size.kind_of? Fixnum
options["cols"] = size
options["rows"] = size
else
options["cols&qu...