Since puppetclasses/:id/edit has 3 tabs on the edit form, the request.referrer changes when each tab is clicked, so we need to save the request.referrer in the session.  If there were no tabs, redirect_back_or_to could be used.