Hello,
I'm having a great time building some rss/atom feeds and I've been quite successful until I hit the html formatting line of the Atom feed.
Here's an example:
If I could just get the
section to work I would be home free.
Help!
I'm having a great time building some rss/atom feeds and I've been quite successful until I hit the html formatting line of the Atom feed.
Here's an example:
Code:
xml.instruct! :xml, :version=>"1.0", :encoding=>"UTF-8"
xml.feed "xml:lang" => "en-US", "xmlns" => '[URL unfurl="true"]http://www.w3.org/2005/Atom[/URL] ' do
xml.title("flavor: #{@flavor} *title1: " + @feed.title)
xml.id( "tag:#{request.host},#{Time.now.utc.year}:#{@feed.title}/#{@feed.title.downcase}" )
xml.link('url: ' + @ feed.guid) if @feed.guid
xml.author { xml.name "Author Name" }
@entities.each do |entity|
xml.entry do
xml.title('title: ' + entity.title )
xml.link("rel" => "alternate", "href" => url_for(url_for :only_path => false, :controller => @this_controller, :action => @this_action, :id => entity.id))
xml.id(url_for(:only_path => false, :controller => @this_controller, :action => @this_action, :id => entity.id))
xml.updated("#{Time.now.utc.year}")
xml.content "type" => "html" do
xml.name entity.body #-->>tried this - doesn't work
xml.text! render(:partial => "shared/feed/entity", :entity => entity)-->>Tried this - doesn't work
end
end
end
end
If I could just get the
Code:
xml.content "type" => "html" do
end
section to work I would be home free.
Help!