On Feb 9, 4:32 am, jh744 <[email protected]> wrote:

> 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.

Your original method was just creating some random new constant. Now
you are actually redefining the constant, so you get a warning about
it (There's a silence_warning method)

Fred

>
> 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