aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/base.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib/action_controller/base.rb')
-rwxr-xr-xactionpack/lib/action_controller/base.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/base.rb b/actionpack/lib/action_controller/base.rb
index 22eb7dc0a3..1f4798b2a0 100755
--- a/actionpack/lib/action_controller/base.rb
+++ b/actionpack/lib/action_controller/base.rb
@@ -256,9 +256,11 @@ module ActionController #:nodoc:
end
# Loads the <tt>file_name</tt> if reload_dependencies is true or requires if it's false.
- def require_or_load(file_name)
+ def require_dependency(file_name)
reload_dependencies ? silence_warnings { load("#{file_name}.rb") } : require(file_name)
end
+
+ Object.send(:define_method, :require_dependency) { |file_name| ActiveRecord::Base.require_dependency(file_name) }
end
public