I need to pass an array of mailboxes from my rails mailer class to the appropriate controller, which I thought should work if I just do
class foo < Actionmailer::Base
def bar(...)
mails_array = Array.new
return mails_array
end
but since the controller gets mails_arraythrough
@mails = Array.new
@mails.concat(foo.bar(...))
I get a:
TypeError in mailsController # index
cannot convert Mail :: Message to Array
Did I miss something? I would expect mails_array to be in the letters and donβt understand why this is not so.
source
share