Implement auto family syncs on login (#1021)

This commit is contained in:
Zach Gollwitzer
2024-07-25 12:51:50 -04:00
committed by GitHub
parent c8590d53ba
commit ef4be7948a
11 changed files with 59 additions and 9 deletions

View File

@@ -0,0 +1,13 @@
module AutoSync
extend ActiveSupport::Concern
included do
before_action :sync_family, if: -> { Current.family.present? && Current.family.needs_sync? }
end
private
def sync_family
Current.family.sync
end
end