我正试图从我的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.
我哪里出错了?
解决方法
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。