Quite new to rails/spree and am trying to create a pdf uploader where users can upload images that will then be sent to the company but when I try to send it I get an undefined local variable or method for 'spree_current_user'.
This is the line that gives the error. I know this would normally grab the id (I have used the same line in controllers) but I am not sure why it wouldn't work within the order mailer.
pdfs = Pdf.where(user_id: spree_current_user.id, created_at: Date.today-1.hour)
Basically I'm just wondering if anybody knows what else I could do? I tried to pass it through the controller as a session[] but this didn't work either.
If there are any other files that you might need to look at then please let me know. Would very much appreciate any help !
Thanks in advance.