class ApplicationController < ActionController::Base protect_from_forgery before_filter :prepare_gon def prepare_gon gon.prefix = ENV['RAILS_RELATIVE_URL_ROOT'] || '/' end end