From 034245595587990cd73ca3a34e945d2127471c9d Mon Sep 17 00:00:00 2001 From: f Date: Fri, 8 Oct 2021 18:42:34 -0300 Subject: [PATCH] =?UTF-8?q?encontrar=20p=C3=A1ginas=20y=20distinguir=20si?= =?UTF-8?q?=20fueron=20cyborgs=20o=20no?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/access_log.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/models/access_log.rb b/app/models/access_log.rb index 0dceb7d7..3a066b33 100644 --- a/app/models/access_log.rb +++ b/app/models/access_log.rb @@ -6,4 +6,7 @@ class AccessLog < ApplicationRecord # # @see {https://en.wikipedia.org/wiki/List_of_HTTP_status_codes} scope :completed_requests, -> { where(request_method: 'GET', request_completion: 'OK', status: [200, 304]) } + scope :non_robots, -> { where(crawler: false) } + scope :robots, -> { where(crawler: true) } + scope :pages, -> { where(sent_http_content_type: ['text/html', 'text/html; charset=utf-8', 'text/html; charset=UTF-8']) } end