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
included do
validates_with FollowLimitValidator, on: :create, unless: :bypass_follow_limit?
end
validates_with FollowLimitValidator, on: :create, unless: :bypass_follow_limit
def bypass_follow_limit=(value)
@bypass_follow_limit = value
end
def bypass_follow_limit?
@bypass_follow_limit
attribute :bypass_follow_limit, :boolean, default: false
end
end