Fix follow limit validator reporting lower number past threshold (#9230)

* Fix follow limit validator reporting lower number past threshold

* Avoid floating point follow limit
This commit is contained in:
Eugen Rochko 2018-11-08 21:06:01 +01:00
parent 330401bec0
commit b3c29ece47
1 changed files with 1 additions and 1 deletions

View File

@ -14,7 +14,7 @@ class FollowLimitValidator < ActiveModel::Validator
if account.following_count < LIMIT
LIMIT
else
account.followers_count * RATIO
[(account.followers_count * RATIO).round, LIMIT].max
end
end
end