Permalink
Browse files

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@276 5ecf4fe…

…2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent 8efa151 commit 84d5519b74f831d31caf00a018ca0c3b60ebb643 @dhh dhh committed Dec 29, 2004
Showing with 0 additions and 19 deletions.
  1. +0 −19 actionpack/lib/action_controller/dependencies.rb
View
19 actionpack/lib/action_controller/dependencies.rb
@@ -1,22 +1,8 @@
-unless Object.respond_to?(:require_dependency)
- Object.send(:define_method, :require_dependency) { |file_name| ActionController::Base.require_dependency(file_name) }
-end
-
module ActionController #:nodoc:
module Dependencies #:nodoc:
def self.append_features(base)
super
-
- base.class_eval do
- # When turned on (which is default), all dependencies are included using "load". This mean that any change is instant in cached
- # environments like mod_ruby or FastCGI. When set to false, "require" is used, which is faster but requires server restart to
- # be effective.
- @@reload_dependencies = true
- cattr_accessor :reload_dependencies
- end
-
base.class_eval { class << self; alias_method :inherited_without_model, :inherited; end }
-
base.extend(ClassMethods)
end
@@ -41,11 +27,6 @@ def self.append_features(base)
# # helper :post (already required)
# end
module ClassMethods
- # Loads the <tt>file_name</tt> if reload_dependencies is true or requires if it's false.
- def require_dependency(file_name)
- reload_dependencies ? silence_warnings { load("#{file_name}.rb") } : require(file_name)
- end
-
# Specifies a variable number of models that this controller depends on. Models are normally Active Record classes or a similar
# backend for modelling entity classes.
def model(*models)

0 comments on commit 84d5519

Please sign in to comment.