I am trying to create an atom feed by following closely (but not
exactly) the example provided in DHH blog screencast. I am getting
the error:
No route matches “/blog/atom_feed.atom” with {:method=>:get}
I was expecting to have problems getting this going; but, not routing
problems. That should be pretty basic. Anyway, my controller action
in the ‘blog’ controller looks like this:
def atom_feed()
@posts=BlogPost.find(:all,:order=>‘created_at’).reverse
respond_to do |format|
format.atom
end
end
Following the example, I created a template (in app/views/blog) named,
‘atom_feed.atom.builder’. Here is its contents:
atom.feed do |feed|
feed.title(“My Great Blog!”)
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(“Doug J.”) }
end
end
end
I have a hunch that my problems are in some way related to the use of
the ‘builder’ template format which I have never even heard of
before. Anyway, can someone please give me a clue as to why I am
having routing problems with this?
Thanks for any input.
... doug