Pat
I'm a little confused about what you mean by “but how can I assign a value to a variable”, but I will give it.
First you are right in the hidden_field cue ball.
<%= hidden_field_tag 'some_name', true %>
or alternatively
<%= hidden_field_tag 'some_name', false %>
You understand that I am sure.
From there, in your controller, when the form is submitted, you will receive the value of this field as follows:
some_boolean = params[:some_name]
Obviously, the variable names will be different, but the general meaning of everything.
Good luck