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

@ -61,8 +61,9 @@ module ClassMethods
# 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