aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/new_base/base.rb
diff options
context:
space:
mode:
authorPratik Naik <pratiknaik@gmail.com>2009-05-22 00:26:58 +0200
committerPratik Naik <pratiknaik@gmail.com>2009-05-22 00:29:47 +0200
commit1a52b246eb245d159a1c331417a4b14923e9bc4e (patch)
treeeaaa878b082b0a4b70bd4146d0cf22ccdce13491 /actionpack/lib/action_controller/new_base/base.rb
parentd2cac9dd0e28b99bd45fd9eaa1d5a6b3dee8fa8f (diff)
downloadrails-1a52b246eb245d159a1c331417a4b14923e9bc4e.tar.gz
rails-1a52b246eb245d159a1c331417a4b14923e9bc4e.tar.bz2
rails-1a52b246eb245d159a1c331417a4b14923e9bc4e.zip
Add HTTP Authentication to the new base
Diffstat (limited to 'actionpack/lib/action_controller/new_base/base.rb')
-rw-r--r--actionpack/lib/action_controller/new_base/base.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/actionpack/lib/action_controller/new_base/base.rb b/actionpack/lib/action_controller/new_base/base.rb
index 08ffafb27e..b432060bc1 100644
--- a/actionpack/lib/action_controller/new_base/base.rb
+++ b/actionpack/lib/action_controller/new_base/base.rb
@@ -30,6 +30,8 @@ module ActionController
include ActionController::Verification
include ActionController::RequestForgeryProtection
include ActionController::Streaming
+ include ActionController::HttpAuthentication::Basic::ControllerMethods
+ include ActionController::HttpAuthentication::Digest::ControllerMethods
# TODO: Extract into its own module
# This should be moved together with other normalizing behavior
@@ -89,6 +91,11 @@ module ActionController
if options.key?(:action) && options[:action].to_s.index("/")
options[:template] = options.delete(:action)
end
+
+ if options[:status]
+ options[:status] = interpret_status(options.delete(:status)).to_i
+ end
+
options
end