From b0157f8d045952930b683bc749610328840a61bf Mon Sep 17 00:00:00 2001 From: Piotr Sarnacki Date: Fri, 15 Oct 2010 18:12:05 +0300 Subject: [PATCH] Removed duplicated method find_root_with_flag Signed-off-by: Santiago Pastorino --- railties/lib/rails/engine.rb | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/railties/lib/rails/engine.rb b/railties/lib/rails/engine.rb index 5fb9cc1825..8029a0ca77 100644 --- a/railties/lib/rails/engine.rb +++ b/railties/lib/rails/engine.rb @@ -343,21 +343,6 @@ module Rails super end - def find_root_with_flag(flag, default=nil) - root_path = self.called_from - - while root_path && File.directory?(root_path) && !File.exist?("#{root_path}/#{flag}") - parent = File.dirname(root_path) - root_path = parent != root_path && parent - end - - root = File.exist?("#{root_path}/#{flag}") ? root_path : default - raise "Could not find root path for #{self}" unless root - - RbConfig::CONFIG['host_os'] =~ /mswin|mingw/ ? - Pathname.new(root).expand_path : Pathname.new(root).realpath - end - def endpoint(endpoint = nil) @endpoint = endpoint if endpoint @endpoint