From cbf2906496b5123fc7bf1be3094693790d047e11 Mon Sep 17 00:00:00 2001 From: blackst0ne Date: Thu, 12 Apr 2018 13:36:31 +1100 Subject: [PATCH] [Rails5] Fix `undefined method 'arel_table' for Ci::Group:Class` error Some specs fail in rails5 branch with errors like ``` 1) Group#secret_variables_for when the ref is not protected contains only the secret variables Failure/Error: variables = Ci::GroupVariable.where(group: list_of_ids) NoMethodError: undefined method `arel_table' for Ci::Group:Class ``` This commit fixes it. --- app/models/ci/group_variable.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/ci/group_variable.rb b/app/models/ci/group_variable.rb index 62d768cc6cf..44cb583e1bd 100644 --- a/app/models/ci/group_variable.rb +++ b/app/models/ci/group_variable.rb @@ -4,7 +4,7 @@ module Ci include HasVariable include Presentable - belongs_to :group + belongs_to :group, class_name: "::Group" alias_attribute :secret_value, :value -- GitLab