I am having no luck embedding images/s in an rss feed I am creating
using a builder template.
I am sure my image path is correct… I have tried image paths as
strings as well and I have placed the xml.image block within the
xml.item block as well as an option. Ultimately I need the image tags
to be in the item block as each news item will have its own image. But
the sample code below has the image block as a direct child of the
channel tag for simplicity’s sake.
Any thoughts on what I am doing wrong?
xml.instruct! :xml, :version => “1.0”
xml.rss :version => “2.0” do
xml.title " News & Events "
xml.description “News and Events”
xml.image do xml.url @news.first.news_image.url(:public_news_image) xml.title "test title" xml.link "http://thesiteroot.test" end @news.each do |news| xml.item do xml.title "NEWS __ " + news.header xml.description news.info xml.pubDate news.created_at.to_s(:rfc822) end end