On Sun, Sep 11, 2011 at 23:37, Joan Gu <li...@ruby-forum.com> wrote:

> Code:
> <%= check_box("schedule_report", "active_#{id}",
> options={:id=>"schedule_report_#{id}_active", :checked
> =>schedule_report.active }, 1, 0) %>
>
> Rendered output:
> <input type="hidden" value="0" name="schedule_report[active_20]">
> <input id="schedule_report_20_active" type="checkbox" value="1"
> name="schedule_report[active_20]" checked="checked">
>
> <input type="hidden" value="0" name="schedule_report[active_17]">
> <input id="schedule_report_17_active" type="checkbox" value="1"
> name="schedule_report[active_17]">
> .......
>
> Problem:
> The value of "1" is always passed, even if the box is UNCHECKED.
> Please help!

Passed to your browser as evidenced by the above renderings (which
would be correct), or as in, the form always returns a 1?  Big
difference.  In the latter case, we'd need to know what browser (and
possibly OS), unless you mean all.  Could be just a browser bug.

-Dave

-- 
Main Web Site: davearonson.com | LOOKING FOR WORK,
Programming Blog: codosaur.us  | preferably RoR, in NoVa/DC;
Excellence Blog:  dare2xl.com  | see main web site.

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