For one of my applications the observer passes “1” when it is checked
and
“undefined” when it isn’t. “undefined” should probably be “0”, but you
can
still tell whether or not it is checked.
For one of my applications the observer passes “1” when it is checked and
“undefined” when it isn’t. “undefined” should probably be “0”, but you can
still tell whether or not it is checked.
Maybe… but since there’s no “unchecked_value” attribute it really is
undefined… I think you’d be safer testing to see…
if params[:option] != “1” then…
where “1” is the value of the ‘value’ attribute. Cause some web browser
might just decide to start returning false or nil or 0 instead of
‘undefined’ so you’re test for ‘undefined’ would then fail…
For one of my applications the observer passes “1” when it is checked
and
“undefined” when it isn’t. “undefined” should probably be “0”, but you
can
still tell whether or not it is checked.