lib/peek/controller_helpers.rb in peek-1.0.1 vs lib/peek/controller_helpers.rb in peek-1.1.0

- old
+ new

@@ -1,20 +1,22 @@ module Peek module ControllerHelpers extend ActiveSupport::Concern included do - prepend_before_action :set_peek_request_id, if: :peek_enabled? - helper_method :peek_enabled? if respond_to? :helper_method + if respond_to? :helper_method + helper_method :peek_enabled? + helper_method :peek_request_id + end end protected - def set_peek_request_id - Peek.request_id = request.env['action_dispatch.request_id'] - end - def peek_enabled? Peek.enabled? + end + + def peek_request_id + request.env['action_dispatch.request_id'] end end end