Я вижу эту ошибку XML:
XML parse error: no element found
Location: http://localhost:3000/feed
Line 1, column 2:
Мой route.rb
match '/feed' => 'konkurrancers#feed',
:as => :feed,
:defaults => { :format => 'xml' }
Мой контроллер:
def feed
@posts = Konkurrancer.all(:select => "name, tracking, id, created_at", :order => "created_at DESC", :limit => 20)
respond_to do |format|
format.html
format.rss { render :layout => false } #index.rss.builder
end
Мой index.rss.строитель:
xml.instruct! :xml, :version => "1.0"
xml.rss :version => "2.0" do
xml.channel do
xml.title "Your Blog Title"
xml.description "A blog about software and chocolate"
for konkurrancer in @posts
xml.item do
xml.title konkurrancer.name
xml.pubDate konkurrancer.posted_at.to_s(:rfc822)
xml.link konkurrancer.tracking
xml.guid konkurrancer.tracking
end
end
end
end
end