diff options
author | Piotr Sarnacki <drogus@gmail.com> | 2010-06-24 14:30:22 +0200 |
---|---|---|
committer | Piotr Sarnacki <drogus@gmail.com> | 2010-09-03 22:59:03 +0200 |
commit | b5975a4a30edb1b77a4d7edd6817a7445c079193 (patch) | |
tree | de657e522b1483eb36662f0c42b8a44e7999394c | |
parent | 7c8f73d1bdf80b2c2561d02623db90f3aaad904a (diff) | |
download | rails-b5975a4a30edb1b77a4d7edd6817a7445c079193.tar.gz rails-b5975a4a30edb1b77a4d7edd6817a7445c079193.tar.bz2 rails-b5975a4a30edb1b77a4d7edd6817a7445c079193.zip |
Delegate non existing class methods to instance for Engine
-rw-r--r-- | railties/lib/rails/application.rb | 5 | ||||
-rw-r--r-- | railties/lib/rails/engine.rb | 6 |
2 files changed, 6 insertions, 5 deletions
diff --git a/railties/lib/rails/application.rb b/railties/lib/rails/application.rb index 5b26333486..a4cdc7306f 100644 --- a/railties/lib/rails/application.rb +++ b/railties/lib/rails/application.rb @@ -71,11 +71,6 @@ module Rails super || instance.respond_to?(*args) end - protected - - def method_missing(*args, &block) - instance.send(*args, &block) - end end delegate :middleware, :to => :config diff --git a/railties/lib/rails/engine.rb b/railties/lib/rails/engine.rb index 12ca553a24..9a8dd8e8d4 100644 --- a/railties/lib/rails/engine.rb +++ b/railties/lib/rails/engine.rb @@ -123,6 +123,12 @@ module Rails RbConfig::CONFIG['host_os'] =~ /mswin|mingw/ ? Pathname.new(root).expand_path : Pathname.new(root).realpath end + + protected + + def method_missing(*args, &block) + instance.send(*args, &block) + end end delegate :paths, :root, :to => :config |