MyReferrer

Installation

Add this line to your application's Gemfile:

gem 'my_referrer'

And then execute:

$ bundle

Or install it yourself as:

$ gem install my_referrer

app/views/layouts/application.html.erb

<head>
  <title>some title</title>
  <%= Gon::Base.render_data %>
  <!-- include your action js code -->
  ...

For rails 3:

  <%= include_gon %>
  ...

app/assets/javascripts/application.js

  ...
  //require= my_referrer 
  ...

Usage