aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack')
-rwxr-xr-xactionpack/lib/action_controller/base.rb11
-rw-r--r--actionpack/lib/action_controller/caching.rb6
2 files changed, 5 insertions, 12 deletions
diff --git a/actionpack/lib/action_controller/base.rb b/actionpack/lib/action_controller/base.rb
index 862d2e5efd..0b4a8ca3c5 100755
--- a/actionpack/lib/action_controller/base.rb
+++ b/actionpack/lib/action_controller/base.rb
@@ -224,14 +224,9 @@ module ActionController #:nodoc:
# FCGI.each_cgi{ |cgi| WeblogController.process_cgi(cgi) }
class Base
DEFAULT_RENDER_STATUS_CODE = "200 OK"
-
- # Action Controller subclasses should be reloaded by the dispatcher in Rails
- # when Dependencies.mechanism = :load.
- def self.inherited(child) #:nodoc:
- child.send :include, Reloadable
- super
- end
-
+
+ include Reloadable::OnlySubclasses
+
# Determines whether the view has access to controller internals @request, @response, @session, and @template.
# By default, it does.
@@view_controller_internals = true
diff --git a/actionpack/lib/action_controller/caching.rb b/actionpack/lib/action_controller/caching.rb
index e62fe11a19..5e6fe3948b 100644
--- a/actionpack/lib/action_controller/caching.rb
+++ b/actionpack/lib/action_controller/caching.rb
@@ -523,10 +523,8 @@ module ActionController #:nodoc:
# ActiveRecord::Observer will mark this class as reloadable even though it should not be.
# However, subclasses of ActionController::Caching::Sweeper should be Reloadable
- def self.reloadable? #:nodoc:
- self != Sweeper
- end
-
+ include Reloadable::OnlySubclasses
+
def before(controller)
self.controller = controller
callback(:before)