From 956c06ea59a267c8ebd04af96fcfe16fa8bb5c8b Mon Sep 17 00:00:00 2001 From: mgabdev <> Date: Sat, 14 Sep 2019 10:43:02 -0400 Subject: [PATCH] Updated follow limit for pro accounts to 50,000 --- app/validators/follow_limit_validator.rb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/validators/follow_limit_validator.rb b/app/validators/follow_limit_validator.rb index 409bf017..1b0b7a35 100644 --- a/app/validators/follow_limit_validator.rb +++ b/app/validators/follow_limit_validator.rb @@ -11,10 +11,12 @@ class FollowLimitValidator < ActiveModel::Validator class << self def limit_for_account(account) - if account.following_count < LIMIT - LIMIT + adjusted_limit = account.is_pro ? 50000 : LIMIT + + if account.following_count < adjusted_limit + adjusted_limit else - [(account.followers_count * RATIO).round, LIMIT].max + [(account.followers_count * RATIO).round, adjusted_limit].max end end end