diff options
author | Douwe Maan <douwe@selenight.nl> | 2017-02-21 18:40:04 -0600 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2017-02-23 09:31:57 -0600 |
commit | 5cd9c7c6ea1ba5c6ad40799b9476145803dccba5 (patch) | |
tree | 2b21f6f51f9fb697a268f410992e7cd3e75bf570 /app/models/members/project_member.rb | |
parent | 8df3eb6648a561e6f4695bbd78077a369aa4b48f (diff) | |
download | gitlab-ce-5cd9c7c6ea1ba5c6ad40799b9476145803dccba5.tar.gz |
Enable Rails/Validation
Diffstat (limited to 'app/models/members/project_member.rb')
-rw-r--r-- | app/models/members/project_member.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/members/project_member.rb b/app/models/members/project_member.rb index 06f8fd39c99..912820b51ac 100644 --- a/app/models/members/project_member.rb +++ b/app/models/members/project_member.rb @@ -7,7 +7,7 @@ class ProjectMember < Member # Make sure project member points only to project as it source default_value_for :source_type, SOURCE_TYPE - validates_format_of :source_type, with: /\AProject\z/ + validates :source_type, format: { with: /\AProject\z/ } validates :access_level, inclusion: { in: Gitlab::Access.values } default_scope { where(source_type: SOURCE_TYPE) } |