Files
maybe/app/controllers/concerns/auto_sync.rb
2024-07-25 12:51:50 -04:00

14 lines
236 B
Ruby

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