Use the action_controller hook for overriding the referer method because there is no action_dispatch hook
Remove unnecessary private method extraction because it breaks link_to(:back) in Rails 3