Ruby and RSS2 Feed not displaying image
Posted
by pcasa
on Stack Overflow
See other posts from Stack Overflow
or by pcasa
Published on 2010-06-18T14:37:36Z
Indexed on
2010/06/18
14:43 UTC
Read the original article
Hit count: 257
Trying to create a simple RSS2 Feed that I could later pass on to FeedBurner but can't get RSS feed to display images at all.
Also, from what I have read having xml.instruct! on top might cause IE to complain it's not a valid feed. Is this true?
My Code looks like
xml.instruct!
xml.rss "version" => "2.0", "xmlns:dc" => "http://purl.org/dc/elements/1.1/" do
xml.channel do
xml.title "Store"
xml.link url_for :only_path => false, :controller => 'products'
xml.description "Store"
xml.pubDate @products.first.updated_at.rfc822 if @products.any?
@products.each do |product|
xml.item do
xml.title product.name
xml.pubDate (product.updated_at.rfc822)
xml.image do
xml.url domain_host + product.product_image.url(:small)
xml.title "Store"
xml.link url_for :only_path => false, :controller => 'products'
end
xml.link url_for :only_path => false, :controller => 'products', :action => 'show', :id => product.permalink
xml.description product.fine_print
xml.guid url_for :only_path => false, :controller => 'products', :action => 'show', :id => product.permalink
end
end
end
end
© Stack Overflow or respective owner