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

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -