Im having issues with rails with the code
if @turno.chop == res[:department].to_s
where turno contains strings like ABC1 and department like ABC, im trying to filter if turno its equal of department but i need reduce the string of turno for that. Every time what i try to do that the code dont finish and stuck in other part of code, when i delete the condition, the code works perfectly but dont do the filter.
i tryid to to do like
if @turno.include?(res[:department].to_s)
But appears the same error.
@turno
andturno
mean different things in Ruby.:department
anddepartment
are not the same.ABC1
does not mean"ABC1"
.include?
would work here.