RSS problem when trying to display ID - HELP


#1

I want to append “#comment-1” or whatever, depending on the id to the
end of my xml.link(" … /#comment-1") attribute in my generated xml.
Well, when I put:

xml.link(" … /#comment-" + comment.id)

I get an Application error (rails) message when I look at the generated
XML. This is what I’m doing without the id on the comments (its working
fine):

xml.instruct! :xml, :version=>“1.0”
xml.rss(:version=>“2.0”){
xml.channel{
xml.title(“simplebeta comments”)
xml.link(“http://simplebeta.com/”)
xml.description(“Keep up to date on what others have to say.”)
xml.language(“en-us”)
for content in @contents
for comment in @comments
if content.comments.include? comment
xml.item do
xml.title("[ " + content.title + " ] comment by " +
comment.name.capitalize)
xml.description(comment.entry)
# rfc822
xml.pubDate(comment.created_at.strftime("%a, %d %b %Y
%H:%M:%S %z"))
xml.link(“http://simplebeta.com/inventory/” +
content.posted_at.strftime("%Y") + “/” +
content.posted_at.strftime("%m") + “/” +
content.posted_at.strftime("%d") + “/” + content.permalink +
“/#comments”)
end
end
end
end
}
}

Any thoughts/ideas why I can’t use the ‘comment.id’ attribute???

Thanks!


#2

Might try:

xml.link(" … /#comment-" + comment.id.to_s)