I can’t quite figure out what I’m doing wrong here..
if @calc.docket_num =~ /DC-000044-10/ || @calc.docket_num =~ /DC-67-09/
@calc.lda = true
else
@calc.lda = false
end
But it seems that @calc.docket_num can be any string whatsoever and it always returns as true.
Am I not doing this right?
This is a one-liner:
The
!!forces the response to true/false, then you can assign your boolean variable directly.