[session_activations] Stop needless updated_at changes

This commit is contained in:
Fosco Marotto 2021-01-27 16:08:39 -05:00
parent 2b99918b26
commit 05e95cf090
2 changed files with 3 additions and 0 deletions

View File

@ -44,8 +44,10 @@ class SessionActivation < ApplicationRecord
end end
def activate(**options) def activate(**options)
SessionActivation.record_timestamps = true
activation = create!(options) activation = create!(options)
purge_old purge_old
SessionActivation.record_timestamps = false
activation activation
end end

View File

@ -19,6 +19,7 @@ Rails.application.routes.draw do
Doorkeeper::AccessToken.connection.stick_to_master! Doorkeeper::AccessToken.connection.stick_to_master!
Doorkeeper::AccessGrant.connection.stick_to_master! Doorkeeper::AccessGrant.connection.stick_to_master!
SessionActivation.connection.stick_to_master! SessionActivation.connection.stick_to_master!
SessionActivation.record_timestamps = false
use_doorkeeper do use_doorkeeper do
controllers authorizations: 'oauth/authorizations', controllers authorizations: 'oauth/authorizations',