Ok.. I have been doing some experimentation.. and honestly, now I am
beginning to get a bit ticked off with how inconsistently this is being
handled....

For example, if you replace the f.select() in my example code with:

select_tag("working", options_for_select([["", ""], ["Yes", true],
["No",false]], @testing.working))

it WORKS!  (well minus the posting values back to the form and having it
update the database since its not in the model..

HOWEVER:
f.select (:working, [["", ""], ["Yes", true], ["No", false]], {:selected =>
@testing.working})

does NOT work.

REALLY?!

In fact I changed the selections choices to have ["first", "first"] ahead of
the "" choice to test a theory that it wasn't actually matching
_anything_... and it turns out that's what its doing, for the case of
"false" it doesn't actually match ANYTHING.  you can replace ":selected =>
false" and it won't work, it will select "Yes".. go ahead, try it.)...
HOWEVER, it works just fine with select_tag?!  AUUUGH.

I've been through the rails code a couple of times, but I cannot see where
this obtuse bug is laying.

-- 
David E. Cross


On Mon, Nov 22, 2010 at 3:25 PM, David Cross <dcrosst...@gmail.com> wrote:

> Sorry, I took a break for the weekend, here it is in .tgz format:
>
> http://www.cs.rpi.edu/~crossd/selecttest.tgz<http://www.cs.rpi.edu/%7Ecrossd/selecttest.tgz>
>
> --
> David E. Cross
>
> On Nov 20, 11:30 am, pepe <p...@betterrpg.com> wrote:
> > Hi David,
> >
> > Can you post your application in a different format? I need a C
> > compiler to install bzip2 and I'd rather not go into all that.
> >
> > Thanks.
>
> --
> 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 rubyonrails-t...@googlegroups.com.
> To unsubscribe from this group, send email to
> rubyonrails-talk+unsubscr...@googlegroups.com<rubyonrails-talk%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/rubyonrails-talk?hl=en.
>
>

-- 
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 rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to