users: disable upgrading to platinum.

Disable the ability to upgrade to Platinum. The Platinum level still
exists, but users can no longer upgrade to it. Sales of Platinum are
being disabled in preparation of increasing the tag limit for Gold
users.
This commit is contained in:
evazion
2022-04-23 22:49:24 -05:00
parent 2b387bdc41
commit 1e4c0ffe78
9 changed files with 15 additions and 52 deletions

View File

@@ -61,7 +61,7 @@ class FavoriteGroup < ApplicationRecord
def creator_can_create_favorite_groups
if creator.favorite_groups.count >= creator.favorite_group_limit
error = "You can only keep up to #{creator.favorite_group_limit} favorite groups."
if !creator.is_platinum?
if !creator.is_gold?
error += " Upgrade your account to create more."
end
errors.add(:base, error)