Change logout deletion method.
This commit is contained in:
parent
dd8c656dd5
commit
5e7cec5345
|
@ -61,7 +61,10 @@ class SessionActivation < ApplicationRecord
|
|||
|
||||
def deactivate(id)
|
||||
return unless id
|
||||
where(session_id: id).destroy_all
|
||||
ActiveRecord::Base.connected_to(role: :writing) do
|
||||
conn = ActiveRecord::Base.connection
|
||||
conn.exec_query "delete from session_activations where session_id = '#{id}'"
|
||||
end
|
||||
end
|
||||
|
||||
def purge_old
|
||||
|
|
Loading…
Reference in New Issue