summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Lopez <james.lopez@vodafone.com>2015-11-12 08:43:30 +0000
committerJames Lopez <james.lopez@vodafone.com>2015-11-12 08:43:30 +0000
commit77dd561796adb94236422fb9da50482271fadbb1 (patch)
treeaffe72410cafdc7e91825a5fa7042779c0f41267
parentfd1b5d6479ca05420dfd9f13ac6af0f53b5b858d (diff)
downloadgitlab-ce-77dd561796adb94236422fb9da50482271fadbb1.tar.gz
fixing rubocop indents
-rw-r--r--app/models/ability.rb22
-rw-r--r--app/models/member.rb4
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") }