aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/metal/conditional_get.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib/action_controller/metal/conditional_get.rb')
-rw-r--r--actionpack/lib/action_controller/metal/conditional_get.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/metal/conditional_get.rb b/actionpack/lib/action_controller/metal/conditional_get.rb
index 29d1919ec5..967bda38f2 100644
--- a/actionpack/lib/action_controller/metal/conditional_get.rb
+++ b/actionpack/lib/action_controller/metal/conditional_get.rb
@@ -1,5 +1,8 @@
# frozen_string_literal: true
+require "active_support/core_ext/object/try"
+require "active_support/core_ext/integer/time"
+
module ActionController
module ConditionalGet
extend ActiveSupport::Concern
@@ -17,7 +20,7 @@ module ActionController
# of cached pages.
#
# class InvoicesController < ApplicationController
- # etag { current_user.try :id }
+ # etag { current_user&.id }
#
# def show
# # Etag will differ even for the same invoice when it's viewed by a different current_user