I tried putting it into a helpers block in grape, but it was not visible from the before block. I will see where else I can put it as a method.