diff options
author | Piotr Sarnacki <drogus@gmail.com> | 2010-10-15 18:12:05 +0300 |
---|---|---|
committer | Santiago Pastorino <santiago@wyeworks.com> | 2010-10-15 13:17:36 -0200 |
commit | b0157f8d045952930b683bc749610328840a61bf (patch) | |
tree | 5fb5be0a629f192e66978797b3b76b4135305f99 /railties | |
parent | 21ff8849bb7d4f1c277d767c7704eb63d8920cc7 (diff) | |
download | rails-b0157f8d045952930b683bc749610328840a61bf.tar.gz rails-b0157f8d045952930b683bc749610328840a61bf.tar.bz2 rails-b0157f8d045952930b683bc749610328840a61bf.zip |
Removed duplicated method find_root_with_flag
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
Diffstat (limited to 'railties')
-rw-r--r-- | railties/lib/rails/engine.rb | 15 |
1 files changed, 0 insertions, 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 |