1
0

follow_limitable.rb 328 B

1234567891011121314151617
  1. # frozen_string_literal: true
  2. module FollowLimitable
  3. extend ActiveSupport::Concern
  4. included do
  5. validates_with FollowLimitValidator, on: :create, unless: :bypass_follow_limit?
  6. end
  7. def bypass_follow_limit=(value)
  8. @bypass_follow_limit = value
  9. end
  10. def bypass_follow_limit?
  11. @bypass_follow_limit
  12. end
  13. end