method

call

call(env)
public

No documentation available.

# File railties/lib/rails/rack/static.rb, line 11
      def call(env)
        path        = env['PATH_INFO'].chomp('/')
        method      = env['REQUEST_METHOD']
        cached_path = (path.empty? ? 'index' : path) + ::ActionController::Base.page_cache_extension

        if FILE_METHODS.include?(method)
          if file_exist?(path)
            return @file_server.call(env)
          elsif file_exist?(cached_path)
            env['PATH_INFO'] = cached_path
            return @file_server.call(env)
          end
        end

        @app.call(env)
      end