# Help with routes

**URL:** <https://www.ruby-forum.com/t/help-with-routes/180947>\
**Category:** Rails\
**Created:** [January 1, 2010, 3:50pm UTC](https://www.ruby-forum.com/t/help-with-routes/180947 "2010-01-01T15:50:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![qaswm](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/q/5f8ce5/32.png) [@qaswm](https://www.ruby-forum.com/u/qaswm)\
**Post date:** [January 1, 2010, 3:50pm UTC](https://www.ruby-forum.com/t/help-with-routes/180947/1 "2010-01-01T15:50:25Z")

</div>

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/xml.xml)  
[http://www.somesite.com/feeds/csv.csv](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.

---

<div class="post-metadata">

**Author:** ![qaswm](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/q/5f8ce5/32.png) [@qaswm](https://www.ruby-forum.com/u/qaswm)\
**Post date:** [January 1, 2010, 4:05pm UTC](https://www.ruby-forum.com/t/help-with-routes/180947/2 "2010-01-01T16:05:15Z")

</div>

Try:

map.resources :feeds, :collection =\> {:xml =\> :get, :csv =\> :get}

2010/1/1 Quee Mm [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

> currently the related items I have in my routes.rb are:

–  
Bruno Grasselli  
Blog: [http://brunograsselli.com.br](http://brunograsselli.com.br)  
Twitter: [http://twitter.com/grasselli](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 removed\_email\_address@domain.invalid.  
To unsubscribe from this group, send email to  
removed\_email\_address@domain.invalid.  
For more options, visit this group at  
[http://groups.google.com/group/rubyonrails-talk?hl=en](http://groups.google.com/group/rubyonrails-talk?hl=en).

---

<div class="post-metadata">

**Author:** ![qaswm](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/q/5f8ce5/32.png) [@qaswm](https://www.ruby-forum.com/u/qaswm)\
**Post date:** [January 1, 2010, 4:29pm UTC](https://www.ruby-forum.com/t/help-with-routes/180947/3 "2010-01-01T16:29:01Z")

</div>

Worked like a charm. Thanks.

Bruno Grasselli wrote:

> Try:
> 
> map.resources :feeds, :collection =\> {:xml =\> :get, :csv =\> :get}
