Notes posted by mpearce

RSS feed
April 30, 2009
0 thanks

attachments and implicit multipart

There is a small gotcha - this caught me up for a while.

If you are using implicit multipart mime types by naming your template xxx.text.html.erb and xxx.text.plain.erb, you will need to change your template name back to the original xxx.erb.

If you use the implicit template name, your attachment will be the only thing in the body of the message - it will ignore your template.

See the “Multipart email” section of the ActionMailer.base documentation.

September 11, 2008
1 thank

CSS columns

You can also use this in a partial to create blocks of content into columns without setting a fixed height. This one is two columns.

.clear { clear: both;}
.block { float:left;width:200px;}

<div class="block">

<p>Content Item</p>

<%= cycle("", "<div class=\"clear\"></div>") -%>