diff options
Diffstat (limited to 'railties/lib/rails/application/configurable.rb')
-rw-r--r-- | railties/lib/rails/application/configurable.rb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/railties/lib/rails/application/configurable.rb b/railties/lib/rails/application/configurable.rb new file mode 100644 index 0000000000..f598e33965 --- /dev/null +++ b/railties/lib/rails/application/configurable.rb @@ -0,0 +1,19 @@ +module Rails + class Application + module Configurable + def self.included(base) + base.extend ClassMethods + end + + module ClassMethods + def inherited(base) + raise "You cannot inherit from a Rails::Application child" + end + end + + def config + @config ||= Application::Configuration.new(self.class.find_root_with_flag("config.ru", Dir.pwd)) + end + end + end +end
\ No newline at end of file |