To remember where your users were before they clicked on your page, capture the url they can from using a before_filter in your controller:

StaticPageController

class StaticPagesController < ApplicationController

  before_filter :last_page

  private

  def last_page
    session[:last_page] = request.env['HTTP_REFERER']
    logger.debug "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"
    logger.debug "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"
    logger.debug "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"
    logger.debug "foo"
    logger.debug request.env['HTTP_REFERER']
    #raise session[:last_page].inspect
  end

end

and then add a link pointing back to that url on your page.

YourPage.html.erb

        <% if session[:last_page] %>
            <%= link_to "Back >>", session[:last_page] %>
        <% end %>

Links that help

http://railscasts.com/episodes/131-going-back
http://guides.rubyonrails.org/action_controller_overview.html#filters