Skip to content

Instantly share code, notes, and snippets.

@rubyonrailsworks
Forked from HungYuHei/rails-back-page
Created October 30, 2012 16:58
Show Gist options
  • Save rubyonrailsworks/3981521 to your computer and use it in GitHub Desktop.
Save rubyonrailsworks/3981521 to your computer and use it in GitHub Desktop.
rails返回上一页
request.env['HTTP_REFERER']
request.referer
<%= link_to_function "返回上一页", "history.go(-1)" %>
<%= link_to "Back", :back %>
redirect_to :back
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment