# Atom Feed

**URL:** <https://www.ruby-forum.com/t/atom-feed/176677>\
**Category:** Rails\
**Created:** [October 4, 2009, 9:16pm UTC](https://www.ruby-forum.com/t/atom-feed/176677 "2009-10-04T21:16:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![djames](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/7ab992/32.png) [@djames](https://www.ruby-forum.com/u/djames)\
**Post date:** [October 4, 2009, 9:16pm UTC](https://www.ruby-forum.com/t/atom-feed/176677/1 "2009-10-04T21:16:47Z")

</div>

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
```

---

<div class="post-metadata">

**Author:** ![djames](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/7ab992/32.png) [@djames](https://www.ruby-forum.com/u/djames)\
**Post date:** [October 5, 2009, 10:27am UTC](https://www.ruby-forum.com/t/atom-feed/176677/2 "2009-10-05T10:27:34Z")

</div>

On Sun, Oct 4, 2009 at 9:02 PM, doug [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) 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 ~

---

<div class="post-metadata">

**Author:** ![djames](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/7ab992/32.png) [@djames](https://www.ruby-forum.com/u/djames)\
**Post date:** [October 5, 2009, 5:56pm UTC](https://www.ruby-forum.com/t/atom-feed/176677/3 "2009-10-05T17:56:39Z")

</div>

> 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
```
