diff options
author | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2012-12-08 06:14:17 -0800 |
---|---|---|
committer | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2012-12-08 06:14:17 -0800 |
commit | bef330803ae4a30bfeaf6dd9c86077cfb5e250e1 (patch) | |
tree | a67bc2eed5146212f7d8977bdc29069e8291557f /railties/lib | |
parent | 3f95908c3b3d9f500bb7940d7aed986e7c9de515 (diff) | |
parent | b9d1d2cddae952650b5f3fd3bbfc5ed7d80f95fc (diff) | |
download | rails-bef330803ae4a30bfeaf6dd9c86077cfb5e250e1.tar.gz rails-bef330803ae4a30bfeaf6dd9c86077cfb5e250e1.tar.bz2 rails-bef330803ae4a30bfeaf6dd9c86077cfb5e250e1.zip |
Merge pull request #8395 from bmaland/attr_accessors
Use attr_accessor for Rails.{application,cache,logger}
Diffstat (limited to 'railties/lib')
-rw-r--r-- | railties/lib/rails.rb | 24 |
1 files changed, 1 insertions, 23 deletions
diff --git a/railties/lib/rails.rb b/railties/lib/rails.rb index 6bf2d8db20..b6a9eccdb6 100644 --- a/railties/lib/rails.rb +++ b/railties/lib/rails.rb @@ -24,13 +24,7 @@ module Rails autoload :InfoController, 'rails/info_controller' class << self - def application - @application ||= nil - end - - def application=(application) - @application = application - end + attr_accessor :application, :cache, :logger # The Configuration instance used to configure the Rails environment def configuration @@ -64,14 +58,6 @@ module Rails application.initialized? end - def logger - @logger ||= nil - end - - def logger=(logger) - @logger = logger - end - def backtrace_cleaner @backtrace_cleaner ||= begin # Relies on Active Support, so we have to lazy load to postpone definition until AS has been loaded @@ -95,14 +81,6 @@ module Rails @_env = ActiveSupport::StringInquirer.new(environment) end - def cache - @cache ||= nil - end - - def cache=(cache) - @cache = cache - end - # Returns all rails groups for loading based on: # # * The Rails environment; |