so that it works in both Rails 3 & 4
new version
back link to referer or a default path
new version