Tuesday, September 13, 2011

[Rails] Re: check_box not passing 0 when unchecked?

Frederick Cheung wrote in post #1021765:
> Ah, ajax may be the key. How are you serialising the form inputs? If
> you're always submitting the checkbox's value then it will indeed only
> ever submit '1'. You'd need to select the appropriate value based on
> whether the checkbox was checked.
>
> Fred

Hi Fred,

Yes, you are right, the ajax code passing checkbox's value is the root
cause.

Problem fixed and thanks for help.

Joan

--
Posted via http://www.ruby-forum.com/.

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

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate