Flowdock
method

find_root_with_flag

Importance_0
Ruby on Rails latest stable (v6.1.7.7) - 0 notes - Class: Rails::Engine
find_root_with_flag(flag, root_path, default = nil) private

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File railties/lib/rails/engine.rb, line 689
      def self.find_root_with_flag(flag, root_path, default = nil) #:nodoc:
        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

        Pathname.new File.realpath root
      end
Register or log in to add new notes.