When I call
@certificate, @exp_date = certificate_with_date(@int, @coach)
in my email template view, I get the following error:
undefined method `certificate_with_date' for #<#<Class:0x0000564473b34af8>:0x0000564473b31ec0>
In my controller, I have included
helper_method :certificate_with_date
This is the method in question;
def certificate_with_date(num, coach)
if num == 1
return 'DBS', coach.DBS
elsif num == 2
return 'Safety', coach.safe_qual
elsif num == 3
return 'Coach', coach.coach_qual
elsif num = 4
return 'First Aid', coach.first_aid
end
end
N.B. I also call this method from another view and it works - for some reason in this particular view I get an error.