As usual, the fastest way to figure something out is to post something
on some help forum - then about 5 minutes after the post, the bell
goes off.
I almost had it right with:
select_month(0,:include_blank => true, :html_options => {:onchange =>
"setBirthMMDD"} )
just needed:
select_month(0, options = {:include_blank => true}, html_options =
{:onchange =>
"setBirthMMDD"} )
Just as the rdoc documentation described. The rdoc documentation still
causes me problems. It would have been helpful if they had at least
one example in the date helper area that used html_options=. Any time
I see a hash, I assume a => assignment.
I at least figured out how to read (or pay closer attention) rdoc
documentation a little better. There are just so many shortcut options
that ruby or rails tries to figure out that it confuses the issue.
Think I'll just be explicit from now on and avoid the shortcuts.
Thank for the help.
Steve
On Sep 2, 6:44 am, Frederick Cheung <[email protected]>
wrote:
> On Sep 2, 9:29 am, AppleII717 <[email protected]> wrote:
>
> > select_month(date, options = {}, html_options = {})
>
> > I have:
>
> > select_month(0,:include_blank => true, :onchange => "setBirthMMDD" )
>
> > I know I've gotten html options to work on form fields, but maybe I'm
> > missing something on how the html_options hash has to be formatted.
>
> If you do that ruby doesn't know that you want the first pair to be in
> one hash and the second in another - you have to be explicit (ie this
> time you don't get to omit the {} round the hashes.
>
> 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
-~----------~----~----~----~------~----~------~--~---