From 4e4b5888a35e403133c8d9a0934a09cd6520f9ae Mon Sep 17 00:00:00 2001 From: f Date: Fri, 3 Sep 2021 15:55:30 -0300 Subject: [PATCH] Peticiones completas --- app/models/access_log.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/models/access_log.rb b/app/models/access_log.rb index 85cd4c3..0dceb7d 100644 --- a/app/models/access_log.rb +++ b/app/models/access_log.rb @@ -1,4 +1,9 @@ # frozen_string_literal: true class AccessLog < ApplicationRecord + # Las peticiones completas son las que terminaron bien y se + # respondieron con 200 OK o 304 Not Modified + # + # @see {https://en.wikipedia.org/wiki/List_of_HTTP_status_codes} + scope :completed_requests, -> { where(request_method: 'GET', request_completion: 'OK', status: [200, 304]) } end