jeudi 19 novembre 2015

How to embed a chart in email when sending out to using mandrill

I want to give out weekly report as a email to the merchant based on certain data where I want to include the chart. Generally on a website I'm using chartkick to draw the charts, but how do I embed chart in an email. Please help me out.

My model code

def weekly_emailer
  # Some code here
  visits = Visit.group(:created_at).count
end

My view code

<%= line_chart @visits %>

Aucun commentaire:

Enregistrer un commentaire