implement Presenter::Base#declarative_policy_delegate

This commit is contained in:
http://jneen.net/ 2017-06-22 11:08:40 -07:00
parent 963b374dc7
commit e5aad75a26
1 changed files with 5 additions and 0 deletions

View File

@ -15,6 +15,11 @@ module Gitlab
super(user, action, overriden_subject || subject)
end
# delegate all #can? queries to the subject
def declarative_policy_delegate
subject
end
class_methods do
def presenter?
true