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?

>
> 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)
> �[email protected] do |post|
>    feed.entry(post) do |entry|
>      entry.title(post.title)
>      entry.content(post.body,:type=>'html')
>      entry.author { |author| author.name("Doug Jolley") }
>    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
> >
>



-- 
Leonardo Mateo.
There's no place like ~

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to