diff options
author | Carl Lerche <carllerche@mac.com> | 2009-09-29 17:33:17 -0700 |
---|---|---|
committer | Carl Lerche <carllerche@mac.com> | 2009-09-29 17:33:17 -0700 |
commit | c9d4529c9da7c8c8f1ba3c2ab55fb40154a25023 (patch) | |
tree | fd4e7f2189e0b26e413c15ff68f8df7e8da378ae /railties/lib/rails/application.rb | |
parent | d1a63b15e329a141e0e4cc3b01d6f348d1c25c0a (diff) | |
download | rails-c9d4529c9da7c8c8f1ba3c2ab55fb40154a25023.tar.gz rails-c9d4529c9da7c8c8f1ba3c2ab55fb40154a25023.tar.bz2 rails-c9d4529c9da7c8c8f1ba3c2ab55fb40154a25023.zip |
Change Rails::Application to a class that is inherited from.
This is still very experimental.
Diffstat (limited to 'railties/lib/rails/application.rb')
-rw-r--r-- | railties/lib/rails/application.rb | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/railties/lib/rails/application.rb b/railties/lib/rails/application.rb index c70365e2f8..6139e20e95 100644 --- a/railties/lib/rails/application.rb +++ b/railties/lib/rails/application.rb @@ -1,10 +1,16 @@ module Rails class Application - attr_accessor :config - def self.load(environment_file) - environment = File.read(environment_file) - Object.class_eval(environment, environment_file) + def self.config + @config ||= Configuration.new + end + + def self.config=(config) + @config = config + end + + def config + self.class.config end def routes @@ -16,7 +22,7 @@ module Rails end def call(env) - @app ||= middleware.build(@routes) + @app ||= middleware.build(routes) @app.call(env) end end |