I’m trying to add a third option for a filter using a radio button. It’s
the old null-value-for-a-boolean story. Basically i’d like to add
another radio button labelled “No Filter” which would insert a null
value into the database when selected. Here is my first attempt. The
third button is showing up, but the null value is not being inserted.
What am I missing?
I’m trying to add a third option for a filter using a radio button. It’s
the old null-value-for-a-boolean story. Basically i’d like to add
another radio button labelled “No Filter” which would insert a null
value into the database when selected. Here is my first attempt. The
third button is showing up, but the null value is not being inserted.
What am I missing?
The parameters a rails app gets from a form are always strings,
because that’s all a form can submit. You’ll need to turn the value
back into a nil server-side.
Fred
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.