summaryrefslogtreecommitdiff
path: root/app/policies
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2017-01-10 17:41:04 -0500
committerRémy Coutable <remy@rymai.me>2017-01-18 16:38:35 +0100
commit061bb6eb6ed0ca6be3c571b3fcfd14a6f9729205 (patch)
tree2b87e3ea5d1e67b19c515891d19b466c80040a04 /app/policies
parente950830ba6a0efa3b0992e6e55cb5b5842f8573a (diff)
downloadgitlab-ce-061bb6eb6ed0ca6be3c571b3fcfd14a6f9729205.tar.gz
More improvements to presenters23563-document-presenters
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'app/policies')
-rw-r--r--app/policies/base_policy.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/policies/base_policy.rb b/app/policies/base_policy.rb
index 43b4a15b81a..b9f1c29c32e 100644
--- a/app/policies/base_policy.rb
+++ b/app/policies/base_policy.rb
@@ -53,7 +53,7 @@ class BasePolicy
def self.class_for(subject)
return GlobalPolicy if subject.nil?
- if subject.class.ancestors.include?(Gitlab::View::Presenter::Base)
+ if subject.class.try(:presenter?)
subject = subject.subject
end