From f8bf1982dff9cf0f35fb7a121932c794ecdc1cb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Tue, 26 Jan 2010 14:58:00 +0100 Subject: Add tests for explicit engines. --- railties/lib/rails/application/configurable.rb | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 railties/lib/rails/application/configurable.rb (limited to 'railties/lib/rails/application') 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 -- cgit v1.2.3