diff options
author | Carlhuda <carlhuda@engineyard.com> | 2009-12-21 16:35:54 -0800 |
---|---|---|
committer | Carlhuda <carlhuda@engineyard.com> | 2009-12-21 16:35:54 -0800 |
commit | d982fe2b2fcc4e197087901774e2f21467c3cec1 (patch) | |
tree | 0ec213911d705ef28b5fb4962d790c9ca87a5fc9 /railties/lib/rails | |
parent | b0b4ae970c1cb586235bcfbc669d43475c7fe684 (diff) | |
download | rails-d982fe2b2fcc4e197087901774e2f21467c3cec1.tar.gz rails-d982fe2b2fcc4e197087901774e2f21467c3cec1.tar.bz2 rails-d982fe2b2fcc4e197087901774e2f21467c3cec1.zip |
Replace reopening the class with App.configure as an alias to class_eval
Diffstat (limited to 'railties/lib/rails')
4 files changed, 7 insertions, 3 deletions
diff --git a/railties/lib/rails/application.rb b/railties/lib/rails/application.rb index d83c65da8d..695a1d7c87 100644 --- a/railties/lib/rails/application.rb +++ b/railties/lib/rails/application.rb @@ -66,6 +66,10 @@ module Rails self.class.config end + class << self + alias configure class_eval + end + def root config.root end diff --git a/railties/lib/rails/generators/rails/app/templates/config/environments/development.rb.tt b/railties/lib/rails/generators/rails/app/templates/config/environments/development.rb.tt index 2b3940d47f..b10103b436 100644 --- a/railties/lib/rails/generators/rails/app/templates/config/environments/development.rb.tt +++ b/railties/lib/rails/generators/rails/app/templates/config/environments/development.rb.tt @@ -1,4 +1,4 @@ -class <%= app_const %> +<%= app_const %>.configure do # Settings specified here will take precedence over those in config/environment.rb # In the development environment your application's code is reloaded on diff --git a/railties/lib/rails/generators/rails/app/templates/config/environments/production.rb.tt b/railties/lib/rails/generators/rails/app/templates/config/environments/production.rb.tt index eff5801526..543a40108c 100644 --- a/railties/lib/rails/generators/rails/app/templates/config/environments/production.rb.tt +++ b/railties/lib/rails/generators/rails/app/templates/config/environments/production.rb.tt @@ -1,4 +1,4 @@ -class <%= app_const %> +<%= app_const %>.configure do # Settings specified here will take precedence over those in config/environment.rb # The production environment is meant for finished, "live" apps. diff --git a/railties/lib/rails/generators/rails/app/templates/config/environments/test.rb.tt b/railties/lib/rails/generators/rails/app/templates/config/environments/test.rb.tt index 3246c7b5f5..428fa35633 100644 --- a/railties/lib/rails/generators/rails/app/templates/config/environments/test.rb.tt +++ b/railties/lib/rails/generators/rails/app/templates/config/environments/test.rb.tt @@ -1,4 +1,4 @@ -class <%= app_const %> +<%= app_const %>.configure do # Settings specified here will take precedence over those in config/environment.rb # The test environment is used exclusively to run your application's |