1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/railties/lib/rails/deprecation.rb
2009-10-17 14:38:40 -07:00

25 lines
No EOL
560 B
Ruby

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