I have bunch of classes
files = ["payment_type","payment_type_ticket_mapping","price_modifier_ticket_delta_mapping","user","revenue_type","revenue_type_group","tax","tax_type","punch"]
files.each {|file| require file }
that are required to fulfill the requirement of Marshal.load but when I run the rsepc they give me the following error
/spec/factories.rb:6: undefined method `admin_login_url' for #<ActionView::Base:0xb62e0228> (ActionView::TemplateError)
When I remove that reuire statement it works fine but that statement is necessary for the functionality of Marshal.load how to unload the loaded classes by require statement after the work is done.
I have resolved that problem using the config.cache_classes = true in the environment.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With