So I'm trying to do something like this:
<% if :back == 'static_pages#game' %>
...do something...
<% if :back == 'static_pages#laugh' %>
...do something else...
I'm trying to get the URL where the action came from, and depending on where it came from, do something. It definitely does not work the way I'm doing it.
You can access the request referrer, for example with:
<% if URI(request.referer).path == '/game' %>
More info in: Rails 3 get request referrer