I'm using mailboxer to send email notifications and if I do this:
def mailboxer_email(object)
return "me@gmail.com"
end
It works perfectly, but I'm trying to return the user's email and I tried this:
def mailboxer_email(object)
return "#{User.email}"
end
I get the error:
NoMethodError (undefined method `email' for #<Class:0x0000000402c138>):
when I tried this:
def mailboxer_email(object)
return :email
end
the logs read
"sent mail to email"
I also tried
def mailboxer_email(object)
return object.email
end
but gives me
NoMethodError (undefined method `email' for #<Message:0x000000039f0530>):