aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/new_base
diff options
context:
space:
mode:
authorPratik Naik <pratiknaik@gmail.com>2009-05-21 11:50:34 +0200
committerPratik Naik <pratiknaik@gmail.com>2009-05-21 21:48:42 +0200
commit59b32f2883b58a1e7bf2c246801a605b673e3fb6 (patch)
treeb1a760cb7f503b745555ac34789940b04fb8af42 /actionpack/lib/action_controller/new_base
parent886eeed52e17184747b43f57282d8635614f1be3 (diff)
downloadrails-59b32f2883b58a1e7bf2c246801a605b673e3fb6.tar.gz
rails-59b32f2883b58a1e7bf2c246801a605b673e3fb6.tar.bz2
rails-59b32f2883b58a1e7bf2c246801a605b673e3fb6.zip
RequestForgeryProtection now works with the new base
Diffstat (limited to 'actionpack/lib/action_controller/new_base')
-rw-r--r--actionpack/lib/action_controller/new_base/base.rb9
-rw-r--r--actionpack/lib/action_controller/new_base/compatibility.rb6
2 files changed, 9 insertions, 6 deletions
diff --git a/actionpack/lib/action_controller/new_base/base.rb b/actionpack/lib/action_controller/new_base/base.rb
index a419a80b6a..3d8f785280 100644
--- a/actionpack/lib/action_controller/new_base/base.rb
+++ b/actionpack/lib/action_controller/new_base/base.rb
@@ -14,10 +14,6 @@ module ActionController
include ActionController::Layouts
include ActionController::ConditionalGet
- include ActionController::Session
- include ActionController::Flash
- include ActionController::Verification
-
# Legacy modules
include SessionManagement
include ActionDispatch::StatusCodes
@@ -27,6 +23,11 @@ module ActionController
# Rails 2.x compatibility
include ActionController::Rails2Compatibility
+ include ActionController::Session
+ include ActionController::Flash
+ include ActionController::Verification
+ include ActionController::RequestForgeryProtection
+
# TODO: Extract into its own module
# This should be moved together with other normalizing behavior
module ImplicitRender
diff --git a/actionpack/lib/action_controller/new_base/compatibility.rb b/actionpack/lib/action_controller/new_base/compatibility.rb
index 9b85b39052..522a9fe23b 100644
--- a/actionpack/lib/action_controller/new_base/compatibility.rb
+++ b/actionpack/lib/action_controller/new_base/compatibility.rb
@@ -1,7 +1,10 @@
module ActionController
module Rails2Compatibility
extend ActiveSupport::DependencyModule
-
+
+ class ::ActionController::ActionControllerError < StandardError #:nodoc:
+ end
+
# Temporary hax
included do
::ActionController::UnknownAction = ::AbstractController::ActionNotFound
@@ -65,7 +68,6 @@ module ActionController
end
module ClassMethods
- def protect_from_forgery() end
def consider_all_requests_local() end
def rescue_action(env)
raise env["action_dispatch.rescue.exception"]