debian-mirror-gitlab/gitlab-peek/lib/peek/controller_helpers.rb

23 lines
377 B
Ruby
Raw Normal View History

2019-12-06 12:11:25 +05:30
module Peek
module ControllerHelpers
extend ActiveSupport::Concern
included do
if respond_to? :helper_method
helper_method :peek_enabled?
helper_method :peek_request_id
end
end
protected
def peek_enabled?
Peek.enabled?
end
def peek_request_id
request.env['action_dispatch.request_id']
end
end
end