From 393df66cbf16a6509f0500907e9abac573449bc8 Mon Sep 17 00:00:00 2001 From: Benjamin ter Kuile Date: Thu, 29 Nov 2012 19:57:49 +0100 Subject: [PATCH] fix for new faye system in production --- app/views/layouts/phone.html.slim | 4 ++-- app/views/user/obtain_token.html.slim | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/views/layouts/phone.html.slim b/app/views/layouts/phone.html.slim index 8466b954..6a10cf50 100644 --- a/app/views/layouts/phone.html.slim +++ b/app/views/layouts/phone.html.slim @@ -46,8 +46,8 @@ html lang="en" setUserId: function(id){ this.stored_user_id = id}, user_id: function(){return this.stored_user_id } }); - QMobile.setAuthToken('#{current_user.authentication_token}'); - QMobile.setUserId('#{current_user.id}'); + + #{Rails.env.production? ? '' : %|QMobile.setAuthToken('#{current_user.authentication_token}');QMobile.setUserId('#{current_user.id}');|} body class=action_name .navbar.navbar-fixed-top diff --git a/app/views/user/obtain_token.html.slim b/app/views/user/obtain_token.html.slim index 73581e42..8033eda9 100644 --- a/app/views/user/obtain_token.html.slim +++ b/app/views/user/obtain_token.html.slim @@ -1,4 +1,5 @@ - content_for :footer do javascript: QMobile.setAuthToken('#{current_user.authentication_token}'); + QMobile.setUserId('#{current_user.id}'); QMobile.goHome();