aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/deprecation.rb
diff options
context:
space:
mode:
Diffstat (limited to 'railties/lib/rails/deprecation.rb')
-rw-r--r--railties/lib/rails/deprecation.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/railties/lib/rails/deprecation.rb b/railties/lib/rails/deprecation.rb
new file mode 100644
index 0000000000..42bba151d6
--- /dev/null
+++ b/railties/lib/rails/deprecation.rb
@@ -0,0 +1,17 @@
+require "active_support/string_inquirer"
+require "active_support/deprecation"
+
+RAILS_ROOT = (Class.new(ActiveSupport::Deprecation::DeprecationProxy) do
+ def target
+ Rails.root
+ end
+
+ def replace(val)
+ puts OMG
+ end
+
+ def warn(callstack, called, args)
+ msg = "RAILS_ROOT is deprecated! Use Rails.root instead."
+ ActiveSupport::Deprecation.warn(msg, callstack)
+ end
+end).new \ No newline at end of file