Merge remote-tracking branch 'parent/main' into kb_development

This commit is contained in:
KMY 2023-10-03 20:42:23 +09:00
commit 9e91c1e653
51 changed files with 334 additions and 250 deletions

View file

@ -1,7 +1,7 @@
# frozen_string_literal: true
class BackupPolicy < ApplicationPolicy
MIN_AGE = 1.week
MIN_AGE = 6.days
def create?
user_signed_in? && current_user.backups.where('created_at >= ?', MIN_AGE.ago).count.zero?