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.rb25
1 files changed, 25 insertions, 0 deletions
diff --git a/railties/lib/rails/deprecation.rb b/railties/lib/rails/deprecation.rb
new file mode 100644
index 0000000000..3c5b8bdec7
--- /dev/null
+++ b/railties/lib/rails/deprecation.rb
@@ -0,0 +1,25 @@
+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
+
+module Rails
+ class Configuration
+ def gem(*args)
+ ActiveSupport::Deprecation.warn("config.gem has been deprecated in favor of the Gemfile.")
+ end
+ end
+end \ No newline at end of file