Actually properly track saved changes within the User model

This commit is contained in:
CactusPuppy 2021-04-01 22:59:53 -07:00
parent f41d0625b4
commit d59c5e9c1d
No known key found for this signature in database
GPG key ID: 4B33B0A3E15E2C82

View file

@ -53,6 +53,7 @@ class UserDisabled < StandardError
end
class User < ApplicationRecord
include TrackSavedChanges
rolify
# prevent N+1 queries with has_cached_role? by preloading roles *always*
default_scope { preload(:roles) }