我正试图从我的Posts模型中设置一个简单的原子进给,我遇到了rails 2和rails 3之间的转换问题.
我尝试通过两个步骤完成此任务:
添加了<%= auto_discovery_link_tag(:atom)%>到我的/views/layouts/application.html.erb文件.
创建了/views/posts/index.atom.builder文件.该文件包含:
atom_Feed do |Feed| Feed.title("Daily Deal") Feed.updated(@posts.first.created_at) @posts.each do |post| Feed.entry(post) do |entry| entry.title(post.title) entry.content(post.body,:type => 'html') entry.author { |author| author.name("Justin Zollars")} end end end
Too many redirects occurred trying to open “Feed:http://localhost:3000/posts”. This might occur if you open a page that is redirected to open another page which then is redirected to open the original page.
我哪里出错了?