On Sep 12, 4:37 am, 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!
>


So what does the code calling this look like (i.e. what collection are
you iterating over) ? What do the received params look like ?

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