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
v2.2.2
Merge remote-tracking branch 'upstream/master'