Skip to content

Commit

Permalink
Replace reopening the class with App.configure as an alias to class_eval
Browse files Browse the repository at this point in the history
  • Loading branch information
Carlhuda committed Dec 22, 2009
1 parent b0b4ae9 commit d982fe2
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions railties/lib/rails/application.rb
Expand Up @@ -66,6 +66,10 @@ def config
self.class.config self.class.config
end end


class << self
alias configure class_eval
end

def root def root
config.root config.root
end end
Expand Down
@@ -1,4 +1,4 @@
class <%= app_const %> <%= app_const %>.configure do
# Settings specified here will take precedence over those in config/environment.rb # Settings specified here will take precedence over those in config/environment.rb


# In the development environment your application's code is reloaded on # In the development environment your application's code is reloaded on
Expand Down
@@ -1,4 +1,4 @@
class <%= app_const %> <%= app_const %>.configure do
# Settings specified here will take precedence over those in config/environment.rb # Settings specified here will take precedence over those in config/environment.rb


# The production environment is meant for finished, "live" apps. # The production environment is meant for finished, "live" apps.
Expand Down
@@ -1,4 +1,4 @@
class <%= app_const %> <%= app_const %>.configure do
# Settings specified here will take precedence over those in config/environment.rb # Settings specified here will take precedence over those in config/environment.rb


# The test environment is used exclusively to run your application's # The test environment is used exclusively to run your application's
Expand Down

0 comments on commit d982fe2

Please sign in to comment.