Ok I do have the following code
def update_state_actions states.each do |state| @state_turns[state.id] -= 1 if @state_turns[state.id] > 0 &
It must be converted to integer variable to perform the opercio: