Can't Dup NilClass


I put the method below in my controller, but I feel it should be in my Billing::Shared module so it can be used by other controllers as well.

However, this introduces the Can’t Dup NilClass message when running a server in development mode.

Do you have any suggestions how I can DRY this code up and keep class caching OFF?

All the best,