sutty/app/models/access_log.rb

10 lines
362 B
Ruby
Raw Normal View History

2020-09-29 21:36:51 +00:00
# frozen_string_literal: true
class AccessLog < ApplicationRecord
2021-09-03 18:55:30 +00:00
# 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]) }
2020-09-29 21:36:51 +00:00
end