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-01-23 21:24:55 +0300
committerMatija Čupić <matteeyah@gmail.com>2018-02-05 20:58:17 +0300
commitcc2bed9283039db726f42184ea635f057534205f (patch)
treefaee9281088f8975c60edd4650c614cf319d05dc /app/models/group.rb
parentedbe911b04465f0e6c72e102d083d0e85848a552 (diff)
Port #save_multiple to Groups::VariablesController
Diffstat (limited to 'app/models/group.rb')
-rw-r--r--app/models/group.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/group.rb b/app/models/group.rb
index 5b7f1b38612..29df4144d03 100644
--- a/app/models/group.rb
+++ b/app/models/group.rb
@@ -31,6 +31,8 @@ class Group < Namespace
has_many :uploads, as: :model, dependent: :destroy # rubocop:disable Cop/ActiveRecordDependent
+ accepts_nested_attributes_for :variables, allow_destroy: true
+
validate :visibility_level_allowed_by_projects
validate :visibility_level_allowed_by_sub_groups
validate :visibility_level_allowed_by_parent