Thanks for looking at this Fred.  You are correct.
DEFAULT_FIELD_OPTIONS is indeed defined in InstanceTagMethods.
However...

below the module InstanceTagMethods class InstanceTag is defined as
follows:

class InstanceTag
  include InstanceTagMethods
end

I actually located it after some searching on google and using the tab-
completion in console to arrive at:
ActionView::Helpers::InstanceTag::DEFAULT<tab>
...
ActionView::Helpers::InstanceTag::DEFAULT_FIELD_OPTIONS
ActionView::Helpers::InstanceTag::DEFAULT_RADIO_OPTIONS
ActionView::Helpers::InstanceTag::DEFAULT_TEXT_AREA_OPTIONS


Redefining
ActionView::Helpers::InstanceTagMethods::DEFAULT_FIELD_OPTIONS in
either environment.rb or in vendor/plugins/default_options/lib/
default_options.rb effects the change that I am looking for but in
both cases I get warning like the following...

work/rails/codata/vendor/plugins/default_options/lib/
default_options.rb:4: warning: already initialized constant
DEFAULT_FIELD_OPTIONS
or
work/rails/codata/config/environment.rb:5: warning: already
initialized constant DEFAULT_FIELD_OPTIONS

If I 'modify the constant' as shown in my original post I don't get
these warnings.



On Feb 5, 5:59 pm, Frederick Cheung <[email protected]>
wrote:
> On Feb 5, 8:09 pm, jh744 <[email protected]> wrote:
>
> > All,
>
> > I have spent the last 6hrs trying to change the default, size="30",
> > that is returned as a result of f.text_field... helper call.  I wanted
> > the default width to be '16' for my application.
>
> > This modification affects the value stored in
> > ActionView::Helpers::InstanceTag::DEFAULT_FIELD_OPTIONS["size"] but
> > not the results of f.text_field.
>
> Looking at the source, it would appear that the existing
> DEFAULT_FIELD_OPTIONS is in ActionView::Helpers::InstanceTagMethods
> not ActionView::Helpers::InstanceTag (or was the above a typo?)
>
> Fred

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to