Skip to content
Browse files

Replace reopening the class with App.configure as an alias to class_eval

  • Loading branch information...
1 parent b0b4ae9 commit d982fe2b2fcc4e197087901774e2f21467c3cec1 Carlhuda committed
View
4 railties/lib/rails/application.rb
@@ -66,6 +66,10 @@ def config
self.class.config
end
+ class << self
+ alias configure class_eval
+ end
+
def root
config.root
end
View
2 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
View
2 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.
View
2 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

0 comments on commit d982fe2

Please sign in to comment.
Something went wrong with that request. Please try again.