Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatija Čupić <matteeyah@gmail.com>2018-05-28 20:23:27 +0300
committerMatija Čupić <matteeyah@gmail.com>2018-05-28 20:23:27 +0300
commit1e431464ff4137601513f82cca7b7e3fd57c5c8d (patch)
treecf28e3e9fa99335b4aeb09c3f2b7aa1decf082bf /app/controllers/projects/clusters
parentf7efc5f8b7e0d8fd77f53de2f1c70863f866aa6f (diff)
Move token_in_session to helper method
Diffstat (limited to 'app/controllers/projects/clusters')
-rw-r--r--app/controllers/projects/clusters/gcp_controller.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/projects/clusters/gcp_controller.rb b/app/controllers/projects/clusters/gcp_controller.rb
index 6a017c2010b..c2c5ad61e01 100644
--- a/app/controllers/projects/clusters/gcp_controller.rb
+++ b/app/controllers/projects/clusters/gcp_controller.rb
@@ -2,6 +2,7 @@ class Projects::Clusters::GcpController < Projects::ApplicationController
before_action :authorize_read_cluster!
before_action :authorize_create_cluster!, only: [:new, :create]
before_action :authorize_google_api, except: :login
+ helper_method :token_in_session
def login
begin
@@ -59,8 +60,7 @@ class Projects::Clusters::GcpController < Projects::ApplicationController
end
def token_in_session
- @token_in_session ||=
- session[GoogleApi::CloudPlatform::Client.session_key_for_token]
+ session[GoogleApi::CloudPlatform::Client.session_key_for_token]
end
def expires_at_in_session