While I’m pulling data out of a form I’m trying to do this
unless v[:state_id] = 0 # Should be interpreted as the state_id is the number zero.
However it doesn’t seem to be working for some reason.
The conditional about it is
unless v[:state_id].blank? # this conditional works
unless v[:state_id] = 0
I’ve tried single quotes, double quotes and nothing seems to be stopping it.
Any obvious reasons ?