diff options
author | Jasper Maes <jaspermaes.jm@gmail.com> | 2019-01-15 22:05:36 +0100 |
---|---|---|
committer | Heinrich Lee Yu <heinrich@gitlab.com> | 2019-04-23 08:31:23 +0800 |
commit | 624a1cdab4da67c7b363602aa1178d0e6ff63475 (patch) | |
tree | 09892175f885c4c5f6725314b25a61280395efcb /app/models/namespace.rb | |
parent | 46bdbc5d776a0438366426e0ef48911123311744 (diff) | |
download | gitlab-ce-624a1cdab4da67c7b363602aa1178d0e6ff63475.tar.gz |
Upgrade Rails to 5.1.6.1
Model.new.attributes now also returns encrypted attributes.
Diffstat (limited to 'app/models/namespace.rb')
-rw-r--r-- | app/models/namespace.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/app/models/namespace.rb b/app/models/namespace.rb index 8638c5a9c53..7228aab2c2e 100644 --- a/app/models/namespace.rb +++ b/app/models/namespace.rb @@ -50,6 +50,8 @@ class Namespace < ApplicationRecord validate :nesting_level_allowed + validates_associated :runners + delegate :name, to: :owner, allow_nil: true, prefix: true delegate :avatar_url, to: :owner, allow_nil: true @@ -57,7 +59,7 @@ class Namespace < ApplicationRecord before_create :sync_share_with_group_lock_with_parent before_update :sync_share_with_group_lock_with_parent, if: :parent_changed? - after_update :force_share_with_group_lock_on_descendants, if: -> { share_with_group_lock_changed? && share_with_group_lock? } + after_update :force_share_with_group_lock_on_descendants, if: -> { saved_change_to_share_with_group_lock? && share_with_group_lock? } # Legacy Storage specific hooks @@ -292,7 +294,7 @@ class Namespace < ApplicationRecord private def path_or_parent_changed? - path_changed? || parent_changed? + saved_change_to_path? || saved_change_to_parent_id? end def refresh_access_of_projects_invited_groups |