RailsCasts Pro episodes are now free!
Learn more or hide this
GitHub User: Swolie
This one the other hand will work.
entry << "<media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='#{post.thumbnail}' height='150' width='300' /> " unless post.thumbnail.blank?
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.
This is what I'm experimenting with, not sure if there's a better way:
entry << "<media:thumbnail url=\"#{post.thumbnail.tiny}\" width='200' height='200' />".html_safe
Thanks for the update Ryan. For some reason my html was being interpreted as plain text and escaped so had to add this:
entry.content safe_markdown(post.content).html_safe, :type => "html"
This one the other hand will work.
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.
This is what I'm experimenting with, not sure if there's a better way:
entry << "<media:thumbnail url=\"#{post.thumbnail.tiny}\" width='200' height='200' />".html_safe
Thanks for the update Ryan. For some reason my html was being interpreted as plain text and escaped so had to add this: