diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2011-03-29 07:29:10 -0700 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2011-03-29 07:29:10 -0700 |
commit | e8d20b858d004e26c3b8c25aae099fce2eca6857 (patch) | |
tree | ed969c92ed3e4d6106730eb37be27ce74628f6a1 /actionpack/lib/action_controller | |
parent | 52351bcfeb833b00366f91e965c057f431b5a8aa (diff) | |
download | rails-e8d20b858d004e26c3b8c25aae099fce2eca6857.tar.gz rails-e8d20b858d004e26c3b8c25aae099fce2eca6857.tar.bz2 rails-e8d20b858d004e26c3b8c25aae099fce2eca6857.zip |
Dont call authenticate_or_request_with_http_basic twice
Diffstat (limited to 'actionpack/lib/action_controller')
-rw-r--r-- | actionpack/lib/action_controller/metal/http_authentication.rb | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/actionpack/lib/action_controller/metal/http_authentication.rb b/actionpack/lib/action_controller/metal/http_authentication.rb index 87c3239486..b98429792d 100644 --- a/actionpack/lib/action_controller/metal/http_authentication.rb +++ b/actionpack/lib/action_controller/metal/http_authentication.rb @@ -110,10 +110,8 @@ module ActionController module ClassMethods def http_basic_authenticate_with(options = {}) before_filter(options.except(:name, :password, :realm)) do - authenticate_or_request_with_http_basic(options[:realm] || "Application") do - authenticate_or_request_with_http_basic do |name, password| - name == options[:name] && password == options[:password] - end + authenticate_or_request_with_http_basic(options[:realm] || "Application") do |name, password| + name == options[:name] && password == options[:password] end end end |