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:
parent
7c8caf930d
commit
ab08519b1a
1 changed files with 2 additions and 1 deletions
|
@ -61,8 +61,9 @@ module ActionController
|
||||||
# will be called only when it returns a false value.
|
# will be called only when it returns a false value.
|
||||||
def force_ssl(options = {})
|
def force_ssl(options = {})
|
||||||
action_options = options.slice(*ACTION_OPTIONS)
|
action_options = options.slice(*ACTION_OPTIONS)
|
||||||
|
redirect_options = options.except(*ACTION_OPTIONS)
|
||||||
before_action(action_options) do
|
before_action(action_options) do
|
||||||
force_ssl_redirect(options.except(*ACTION_OPTIONS))
|
force_ssl_redirect(redirect_options)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue