1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Don't reprocess the options hash on every request

This commit is contained in:
Andrew White 2013-04-27 12:43:47 +01:00
parent 7c8caf930d
commit ab08519b1a

View file

@ -61,8 +61,9 @@ module ActionController
# will be called only when it returns a false value.
def force_ssl(options = {})
action_options = options.slice(*ACTION_OPTIONS)
redirect_options = options.except(*ACTION_OPTIONS)
before_action(action_options) do
force_ssl_redirect(options.except(*ACTION_OPTIONS))
force_ssl_redirect(redirect_options)
end
end
end