upgrades: fix Danbooru.config.user_upgrades_enabled? setting

* Fix it so that if upgrades are disabled, only the payment button is disabled instead of the whole page.
* Fix it so that disabling upgrades with DANBOORU_USER_UPGRADES_ENABLED="false" works.
This commit is contained in:
evazion
2022-05-17 01:19:20 -05:00
parent 3dbe6ea842
commit 8239a1b551
3 changed files with 5 additions and 3 deletions

View File

@@ -28,7 +28,7 @@ class UserUpgrade < ApplicationRecord
scope :self_upgrade, -> { where("recipient_id = purchaser_id") }
def self.enabled?
Danbooru.config.user_upgrades_enabled?
Danbooru.config.user_upgrades_enabled?.to_s.truthy?
end
def self.gold_price