From dc1166d12bbe4f5b65862f4d46cd0ab98141b1cb Mon Sep 17 00:00:00 2001 From: Pratik Naik Date: Tue, 1 Apr 2008 02:09:52 +0000 Subject: Add Rails.logger, Rails.root, Rails.env and Rails.cache shortcuts for RAILS_* constants git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9180 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- railties/lib/initializer.rb | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'railties/lib') diff --git a/railties/lib/initializer.rb b/railties/lib/initializer.rb index 40c2ad90cb..d2c61b8dc9 100644 --- a/railties/lib/initializer.rb +++ b/railties/lib/initializer.rb @@ -22,6 +22,22 @@ module Rails @@configuration = configuration end + def self.logger + RAILS_DEFAULT_LOGGER + end + + def self.root + RAILS_ROOT + end + + def self.env + RAILS_ENV + end + + def self.cache + RAILS_CACHE + end + # The Initializer is responsible for processing the Rails configuration, such # as setting the $LOAD_PATH, requiring the right frameworks, initializing # logging, and more. It can be run either as a single command that'll just -- cgit v1.2.3