RailsCasts Pro episodes are now free!

Learn more or hide this

Swolie's Profile

GitHub User: Swolie

Comments by

Avatar

This one the other hand will work.

ruby
 entry <<  "<media:thumbnail  xmlns:media='http://search.yahoo.com/mrss/' url='#{post.thumbnail}' height='150' width='300' />
        " unless post.thumbnail.blank?
Avatar

nm, that doesn't work. I added an image to the summary but that doesn't seem to work either. Still looking for a solution.

Avatar

This is what I'm experimenting with, not sure if there's a better way:

ruby
entry << "<media:thumbnail url=\"#{post.thumbnail.tiny}\" width='200' height='200'  />".html_safe
Avatar

Thanks for the update Ryan. For some reason my html was being interpreted as plain text and escaped so had to add this:

ruby
entry.content safe_markdown(post.content).html_safe, :type => "html"