ruby on rails - ActionMailer generating multipart email instead of plain html -
i using ruby on rails 4.0.10 , have following mailer
class adminmailer < actionmailer::base def daily_report @stats = some_method attachments[@stats.filename] = @stats.to_csv mail(:to => receivers, :subject => "some subject goes here") |format| format.html end end end
the template mail contains htm:
$ ls app/views/admin_mailer | grep daily daily_report.html.erb
but reason email being rendered empty
class adminmailertest < actionmailer::testcase def test_daily_report msg = adminmailer.daily_report assert_equal '32', msg.body.to_s.size # returns 0 assert_equal 'text/html', msg.mime_type # fails end end
any idea why sending text email?
Comments
Post a Comment