method

gzip_file_path

rails latest stable - Class: ActionDispatch::FileHandler

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v6.0.0) is shown here.

gzip_file_path(path)
private

No documentation available.

# File actionpack/lib/action_dispatch/middleware/static.rb, line 89
      def gzip_file_path(path)
        can_gzip_mime = content_type(path) =~ /\A(?:text\/|application\/javascript)/
        gzip_path     = "#{path}.gz"
        if can_gzip_mime && File.exist?(File.join(@root, ::Rack::Utils.unescape_path(gzip_path)))
          gzip_path
        else
          false
        end
      end