From 05e95cf09049e9a658162d118795faa7e6bcf215 Mon Sep 17 00:00:00 2001 From: Fosco Marotto Date: Wed, 27 Jan 2021 16:08:39 -0500 Subject: [PATCH] [session_activations] Stop needless updated_at changes --- app/models/session_activation.rb | 2 ++ config/routes.rb | 1 + 2 files changed, 3 insertions(+) diff --git a/app/models/session_activation.rb b/app/models/session_activation.rb index 34d25c83..e43d59b7 100644 --- a/app/models/session_activation.rb +++ b/app/models/session_activation.rb @@ -44,8 +44,10 @@ class SessionActivation < ApplicationRecord end def activate(**options) + SessionActivation.record_timestamps = true activation = create!(options) purge_old + SessionActivation.record_timestamps = false activation end diff --git a/config/routes.rb b/config/routes.rb index aebfc15d..e254b270 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -19,6 +19,7 @@ Rails.application.routes.draw do Doorkeeper::AccessToken.connection.stick_to_master! Doorkeeper::AccessGrant.connection.stick_to_master! SessionActivation.connection.stick_to_master! + SessionActivation.record_timestamps = false use_doorkeeper do controllers authorizations: 'oauth/authorizations',