Using the ENV isn't perfect here, try using the :controller and :action keys in the params hash to fix this