Hi Mark,

could you please file the Ticket for this one. It's really strange and
we must add specs and fix this corner case. Thanks.

Pavel

On Oct 19, 2:48 am, MarkMT <[email protected]> wrote:
> Another clue about this...
>
> The form that has the checkbox in it also has a
>      <%= file_field :attachment %>
> input to handle a file upload. When I remove this file upload input
> from the form, the checkbox data arrives correctly. I have no idea
> why.
>
> Appreciate any insights.
>
>
>
> MarkMT wrote:
> > I'm seeing some behavior I don't understand with checkbox input in
> > merb 1.1.
>
> > My erb looks like this -
>
> > ---
> > <%= form_for @event, :action => action do %>
> >           <%= check_box :local, :on => 'true', :off => 'false' %>
> > <% end =%>
> > ---
>
> > I have 1.0.11 running fine on my production machine and have recently
> > installed edge on my development machine. The html generated in the
> > two cases is almost identical. Both generate a hidden field preceding
> > the html checkbox. The hidden input and the checkbox both have
> > name="event[local]".
>
> > The only difference between the two versions seems to be that with
> > 1.0.11 the element id on the hidden field has square brackets but not
> > in 1.1 - I believe this reflects this patch -
> >http://sick.snusnu.info/2009/03/25/merb-helpers-should-produce-valid-...
> > - and afaik this shouldn't cause any problems.
>
> > The weirdness is that with edge, when the checkbox is checked, the
> > request that arrives in the controller has the input set to 'false',
> > even though firebug shows that the form generates an input with value
> > 'true' as it should be (subsequent to a 'false' value generated by the
> > hidden field). I see the same thing with 5 different checkboxes in the
> > same form.
>
> > Anyone else seen this?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"merb" 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/merb?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to