开发者

Rails3 - email template

I am fetching email content from database and storing it in variable and passsing it to email template.

i.e:

@email_content = Email.find(1) 
@email_content = @email_content.content

开发者_如何学CMy content is like this: "hi, how are you doing, thanks". With html <br/> tags in between the content.

Problem is, I'm getting the mail as plain text, the html tags are not working.

Could someone help me solve this?


In your view file you need to put this

<%= @email_content.html_safe %>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜