2
0

Use ActiveModel::Attributes in FollowLimitable concern (#35327)

This commit is contained in:
Matt Jankowski
2025-07-10 03:40:56 -04:00
committed by GitHub
parent 28633a504a
commit c442589593

View File

@@ -4,14 +4,8 @@ module FollowLimitable
extend ActiveSupport::Concern extend ActiveSupport::Concern
included do included do
validates_with FollowLimitValidator, on: :create, unless: :bypass_follow_limit? validates_with FollowLimitValidator, on: :create, unless: :bypass_follow_limit
end
def bypass_follow_limit=(value) attribute :bypass_follow_limit, :boolean, default: false
@bypass_follow_limit = value
end
def bypass_follow_limit?
@bypass_follow_limit
end end
end end