diff options
author | James Lopez <james.lopez@vodafone.com> | 2015-11-12 08:43:30 +0000 |
---|---|---|
committer | James Lopez <james.lopez@vodafone.com> | 2015-11-12 08:43:30 +0000 |
commit | 77dd561796adb94236422fb9da50482271fadbb1 (patch) | |
tree | affe72410cafdc7e91825a5fa7042779c0f41267 /app | |
parent | fd1b5d6479ca05420dfd9f13ac6af0f53b5b858d (diff) | |
download | gitlab-ce-77dd561796adb94236422fb9da50482271fadbb1.tar.gz |
fixing rubocop indents
Diffstat (limited to 'app')
-rw-r--r-- | app/models/ability.rb | 22 | ||||
-rw-r--r-- | app/models/member.rb | 4 |
2 files changed, 14 insertions, 12 deletions
diff --git a/app/models/ability.rb b/app/models/ability.rb index b46c4943bf5..6526cc6bc6a 100644 --- a/app/models/ability.rb +++ b/app/models/ability.rb @@ -6,17 +6,17 @@ class Ability return [] if user.blocked? case subject.class.name - when "Project" then project_abilities(user, subject) - when "Issue" then issue_abilities(user, subject) - when "Note" then note_abilities(user, subject) - when "ProjectSnippet" then project_snippet_abilities(user, subject) - when "PersonalSnippet" then personal_snippet_abilities(user, subject) - when "MergeRequest" then merge_request_abilities(user, subject) - when "Group" then group_abilities(user, subject) - when "Namespace" then namespace_abilities(user, subject) - when "GroupMember" then group_member_abilities(user, subject) - when "ProjectMember" then project_member_abilities(user, subject) - else [] + when "Project" then project_abilities(user, subject) + when "Issue" then issue_abilities(user, subject) + when "Note" then note_abilities(user, subject) + when "ProjectSnippet" then project_snippet_abilities(user, subject) + when "PersonalSnippet" then personal_snippet_abilities(user, subject) + when "MergeRequest" then merge_request_abilities(user, subject) + when "Group" then group_abilities(user, subject) + when "Namespace" then namespace_abilities(user, subject) + when "GroupMember" then group_member_abilities(user, subject) + when "ProjectMember" then project_member_abilities(user, subject) + else [] end.concat(global_abilities(user)) end diff --git a/app/models/member.rb b/app/models/member.rb index 30160c813e1..ab5a8e6228d 100644 --- a/app/models/member.rb +++ b/app/models/member.rb @@ -36,7 +36,9 @@ class Member < ActiveRecord::Base validates :access_level, inclusion: { in: Gitlab::Access.all_values }, presence: true validates :invite_email, presence: { if: :invite? }, email: { strict_mode: true, allow_nil: true }, - uniqueness: { scope: [:source_type, :source_id], allow_nil: true } + uniqueness: { scope: [:source_type, + :source_id], + allow_nil: true } scope :invite, -> { where(user_id: nil) } scope :non_invite, -> { where("user_id IS NOT NULL") } |