Flowdock
method

match?

Importance_0
Ruby on Rails latest stable (v4.2.1) - 0 notes - Class: FileHandler
match?(path) public

No documentation

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

Hide source
# File actionpack/lib/action_dispatch/middleware/static.rb, line 23
    def match?(path)
      path = URI.parser.unescape(path)
      return false unless path.valid_encoding?

      paths = [path, "#{path}#{ext}", "#{path}/index#{ext}"].map { |v|
        Rack::Utils.clean_path_info v
      }

      if match = paths.detect { |p|
        path = File.join(@root, p)
        begin
          File.file?(path) && File.readable?(path)
        rescue SystemCallError
          false
        end

      }
        return ::Rack::Utils.escape(match)
      end
    end
Register or log in to add new notes.