gitlab-org--gitlab-foss/app/serializers/request_aware_entity.rb
2016-12-19 21:27:08 +00:00

15 lines
262 B
Ruby

module RequestAwareEntity
extend ActiveSupport::Concern
included do
include Gitlab::Routing.url_helpers
end
def request
@options.fetch(:request)
end
def can?(object, action, subject)
Ability.allowed?(object, action, subject)
end
end