Atom Feed

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

On Sun, Oct 4, 2009 at 9:02 PM, doug [email protected] wrote:

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}
Did you define the new route on config/routes.rb?

end
entry.content(post.body,:type=>‘html’)
Thanks for any input.

    ... doug


Leonardo M…
There’s no place like ~

Did you define the new route on config/routes.rb?

No; and, that seems to be what I have to do. I was hoping that I
wasn’t going to have to tweak the routes.rb file. I sort of like
having it pristine in its out-of-the-box state. Oh well. Problem
solved. Thanks so much for the input.

     ... doug