Try:
map.resources :feeds, :collection => {:xml => :get, :csv => :get}
2010/1/1 Quee Mm <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org>
> I would like to serve different feeds eg: xml, csv etc. which will be
> created on request and will be served from the controller named feeds.
>
> the action names will be xml and csv.
>
> how can i setup the routes that i show the proper feeds at:
>
> http://www.somesite.com/feeds/xml.xml
> http://www.somesite.com/feeds/csv.csv
>
> currently the related items I have in my routes.rb are:
>
> map.resources :feeds
>
> map.connect '':controller/:action.:format''
>
> any help in this regard is greatly appriciated.
> --
> Posted via http://www.ruby-forum.com/.
>
> --
>
> 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
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To unsubscribe from this group, send email to
>
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
> .
> For more options, visit this group at
> http://groups.google.com/group/rubyonrails-talk?hl=en.
>
>
>
--
Bruno Grasselli
Blog: http://brunograsselli.com.br
Twitter: http://twitter.com/grasselli
--
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
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.