diff --git a/activesupport/lib/active_support/messages/rotation_configuration.rb b/activesupport/lib/active_support/messages/rotation_configuration.rb index bd50d6d348..42d7700a64 100644 --- a/activesupport/lib/active_support/messages/rotation_configuration.rb +++ b/activesupport/lib/active_support/messages/rotation_configuration.rb @@ -9,12 +9,20 @@ module ActiveSupport @signed, @encrypted = [], [] end - def rotate(kind, *args) + def rotate(kind, *args, **options) case kind when :signed - @signed << args + if options&.any? + @signed << (args << options) + else + @signed << args + end when :encrypted - @encrypted << args + if options&.any? + @encrypted << (args << options) + else + @encrypted << args + end end end end