If current_account is set to personal, the billing page return undefined method 'name'

If current_account is set to personal, the billing page return undefined method 'name'
If I switch to another account, the billing page works.



The only difference I see in the rails console is personal set to true.



The User.first.accounts.first.subscribtion return default processor Jumpstart.



I know user accounts shouldn't be able to access billing. I think this account was created automatically when I created the admin user. Is there a way to fix this issue? It works on the second account I created manually.

Thanks in advance!

I found out that removing the Pay::Subscription #1 made the billing page to work:





Chris Oliver
Ah yeah, the Jumpstart Pro free plan to give admins full access doesn't have a typical Plan record. I'm thinking we may want to add an exception in there, rather than just fixing the nil access.
Chris Oliver
Forgot, this is already in JSP in one of the migrations. You don't want to delete that Plan since it's used for admins.

Here's the code to re-create it:

    Plan.create(
      name: "Free",
      interval: :month,
      trial_period_days: 0,
      details: {
        jumpstart_id: :free
      }
    )
Thanks a lot.
I was just playing with it to see what's going on.

Yes, an exception would be better than fixing the nil access.
Notifications
You’re not receiving notifications from this thread.
© 2022 Jumpstart Pro by GoRails, LLC