class ClientsController < ApplicationController include ClientHelper include UsersHelper AUTHED = %W{friend} def index # we want to enforce that /client is always the client view prefix # this is a side effect of setting root path to '/'; soon we can remove this when we implement the new home page if request.path == '/' redirect_to client_url return end @in_client_page = true @minimal_curtain = Rails.application.config.minimal_curtain gon.recurly_tax_estimate_jam_track_plan = Rails.application.config.recurly_tax_estimate_jam_track_plan render :layout => 'client' end def latency_tester render :layout => 'client' end def auth_action if current_user session.delete(:return_to) if session[:return_to] =~ /authed/ # FIXME: implement auth-action on a per-case basis redirect_to(client_url) and return else if AUTHED.include?(params[:authed]) session[:return_to] = auth_action_url(:authed => params[:authed], :data => params[:data]) else session.delete(:return_to) if session[:return_to] =~ /authed/ end redirect_to client_url end end end