2009-06-15 14:44:45 -04:00
module ActionController
2009-08-06 18:50:22 -04:00
class Base < Metal
2009-06-15 14:44:45 -04:00
abstract!
include AbstractController :: Callbacks
2009-12-30 19:33:54 -05:00
include AbstractController :: Layouts
2010-01-20 08:41:23 -05:00
include AbstractController :: Translation
2009-06-15 14:44:45 -04:00
include ActionController :: Helpers
2010-01-03 21:32:02 -05:00
2009-06-15 14:44:45 -04:00
include ActionController :: HideActions
2010-02-25 18:05:10 -05:00
include ActionController :: UrlFor
2009-12-20 20:25:13 -05:00
include ActionController :: Redirecting
2009-12-20 20:15:31 -05:00
include ActionController :: Rendering
2009-12-20 21:15:20 -05:00
include ActionController :: Renderers :: All
2009-06-15 14:44:45 -04:00
include ActionController :: ConditionalGet
2009-12-20 21:05:26 -05:00
include ActionController :: RackDelegation
2009-06-15 14:44:45 -04:00
# Legacy modules
include SessionManagement
include ActionController :: Caching
include ActionController :: MimeResponds
# Rails 2.x compatibility
2009-12-02 23:01:01 -05:00
include ActionController :: Compatibility
2009-06-15 14:44:45 -04:00
include ActionController :: Cookies
include ActionController :: Flash
include ActionController :: Verification
include ActionController :: RequestForgeryProtection
include ActionController :: Streaming
2010-03-09 13:37:46 -05:00
include ActionController :: RecordIdentifier
2009-06-15 14:44:45 -04:00
include ActionController :: HttpAuthentication :: Basic :: ControllerMethods
include ActionController :: HttpAuthentication :: Digest :: ControllerMethods
2010-01-12 18:41:04 -05:00
# Add instrumentations hooks at the bottom, to ensure they instrument
# all the methods properly.
include ActionController :: Instrumentation
2009-06-15 14:44:45 -04:00
include ImplicitRender
2008-12-25 15:45:59 -05:00
2009-06-15 14:44:45 -04:00
include ActionController :: Rescue
2006-08-07 02:11:56 -04:00
2009-06-15 14:44:45 -04:00
def self . inherited ( klass )
:: ActionController :: Base . subclasses << klass . to_s
super
2010-01-24 06:04:37 -05:00
klass . helper :all
2009-06-15 14:44:45 -04:00
end
2008-11-01 07:16:15 -04:00
2009-06-15 14:44:45 -04:00
def self . subclasses
@subclasses || = [ ]
end
2008-11-01 07:16:15 -04:00
2010-01-21 05:39:57 -05:00
# This method has been moved to ActionDispatch::Request.filter_parameters
2010-01-21 10:50:11 -05:00
def self . filter_parameter_logging ( * args , & block )
2010-01-21 05:39:57 -05:00
ActiveSupport :: Deprecation . warn ( " Setting filter_parameter_logging in ActionController is deprecated and has no longer effect, please set 'config.filter_parameters' in config/application.rb instead " , caller )
2010-01-21 10:50:11 -05:00
filter = Rails . application . config . filter_parameters
filter . concat ( args )
filter << block if block
filter
2010-01-21 05:39:57 -05:00
end
2010-01-29 10:16:01 -05:00
2010-03-07 09:24:30 -05:00
ActionController . run_base_hooks ( self )
2008-11-23 17:35:13 -05:00
end
2007-09-13 20:25:59 -04:00
end
2010-03-04 15:21:49 -05:00
require " action_controller/deprecated/base "