diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-12-21 17:31:49 +0300 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-12-21 17:31:49 +0300 |
commit | e072a2740e4b4112830f16f061704a88d5a9cabb (patch) | |
tree | e0bfd9e6448d2fa5f9f176054051fb58a06e663d /app/serializers/request_aware_entity.rb | |
parent | 468b47d47c004f7a7a2eef7dace2a0b808df9175 (diff) |
Add missing specs for request aware entity module
[ci skip]
Diffstat (limited to 'app/serializers/request_aware_entity.rb')
-rw-r--r-- | app/serializers/request_aware_entity.rb | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/app/serializers/request_aware_entity.rb b/app/serializers/request_aware_entity.rb index e159d750cb7..3039014aaaa 100644 --- a/app/serializers/request_aware_entity.rb +++ b/app/serializers/request_aware_entity.rb @@ -2,14 +2,11 @@ module RequestAwareEntity extend ActiveSupport::Concern included do - include Gitlab::Routing.url_helpers + include Gitlab::Routing + include Gitlab::Allowable end def request - @options.fetch(:request) - end - - def can?(object, action, subject) - Ability.allowed?(object, action, subject) + options.fetch(:request) end end |