Remove CurrentUser.country.

This was Cloudflare-specific and it was only used for selecting the
currency during user upgrades.
This commit is contained in:
evazion
2022-10-18 18:14:01 -05:00
parent 873c67db58
commit 6a0e553a84
3 changed files with 4 additions and 12 deletions

View File

@@ -5,7 +5,7 @@ class UserUpgradesController < ApplicationController
def create
@user_upgrade = authorize UserUpgrade.create(recipient: recipient, purchaser: CurrentUser.user, status: "pending", upgrade_type: params[:upgrade_type], payment_processor: params[:payment_processor])
@country = params[:country] || CurrentUser.country || "US"
@country = params[:country] || "US"
@allow_promotion_codes = params[:promo].to_s.truthy?
@checkout = @user_upgrade.create_checkout!(country: @country, allow_promotion_codes: @allow_promotion_codes)