Move template handler registration into railtie