Sha256: d9d8c2af6d20f59aeec7e97a04833330afcf4d98b071bd0711edd217c52edd45
Contents?: true
Size: 424 Bytes
Versions: 29
Compression:
Stored size: 424 Bytes
Contents
# frozen_string_literal: true module Spotlight ## # Page-level locking to discourage update conflicts class Lock < ActiveRecord::Base belongs_to :on, polymorphic: true belongs_to :by, polymorphic: true, optional: true def current_session! @current_session = true end def current_session? !!@current_session end def stale? created_at < (12.hours.ago) end end end
Version data entries
29 entries across 29 versions & 1 rubygems