You need to sign in or sign up before continuing.
Create a flag for indicating existing subscriptions for a customer
Problem
We have a special condition for hiding some menu items in the navigation bar. If a customer has at least one purchase we show the menu item Manage purchases
otherwise it's hidden. Right now we have a special method for checking that condition. The problem is this method makes HTTP requests to Zuora for getting the list of subscriptions. And we do that every time we load our navigation bar.
You can test it locally by adding httplog
gem to your Gemfile
then go any page and start refreshing the page.
Proposal
Create a special column for the Customer for indicating existing subscriptions for a customer.
Result
Decreasing the amount of requests to Zuora and improved page load.