Browse files

Delegate non existing class methods to instance for Engine

  • Loading branch information...
1 parent 7c8f73d commit b5975a4a30edb1b77a4d7edd6817a7445c079193 @drogus drogus committed Jun 24, 2010
Showing with 6 additions and 5 deletions.
  1. +0 −5 railties/lib/rails/application.rb
  2. +6 −0 railties/lib/rails/engine.rb
View
5 railties/lib/rails/application.rb
@@ -71,11 +71,6 @@ def respond_to?(*args)
super || instance.respond_to?(*args)
end
- protected
-
- def method_missing(*args, &block)
- instance.send(*args, &block)
- end
end
delegate :middleware, :to => :config
View
6 railties/lib/rails/engine.rb
@@ -123,6 +123,12 @@ def find_root_with_flag(flag, default=nil)
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

0 comments on commit b5975a4

Please sign in to comment.