Merge remote-tracking branch 'parent/main' into upstream-20240906

This commit is contained in:
KMY 2024-09-06 08:42:24 +09:00
commit f18eabfe75
689 changed files with 4369 additions and 2434 deletions

View file

@ -2,10 +2,10 @@
module Redisable
def redis
Thread.current[:redis] ||= RedisConfiguration.pool.checkout
Thread.current[:redis] ||= RedisConnection.pool.checkout
end
def with_redis(&block)
RedisConfiguration.with(&block)
RedisConnection.with(&block)
end
end

View file

@ -0,0 +1,21 @@
# frozen_string_literal: true
module Reviewable
extend ActiveSupport::Concern
def requires_review?
reviewed_at.nil?
end
def reviewed?
reviewed_at.present?
end
def requested_review?
requested_review_at.present?
end
def requires_review_notification?
requires_review? && !requested_review?
end
end