# map.resources :controller and form\_for

**URL:** <https://discuss.rubyonrails.org/t/map-resources-controller-and-form-for/45908>\
**Category:** rubyonrails-talk\
**Created:** [September 9, 2009, 10:03am UTC](https://discuss.rubyonrails.org/t/map-resources-controller-and-form-for/45908 "2009-09-09T10:03:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Abhinav\_Saxena](https://avatars.discourse-cdn.com/v4/letter/a/4da419/32.png) [@Abhinav\_Saxena](https://discuss.rubyonrails.org/u/Abhinav_Saxena)\
**Post date:** [September 9, 2009, 10:03am UTC](https://discuss.rubyonrails.org/t/map-resources-controller-and-form-for/45908/1 "2009-09-09T10:03:44Z")

</div>

As far as I understand, you are trying to generate URLs with resource name "blog" when actual controller is named posts. So the correct path should be blogs\_path (for your example) and not posts\_path, and I think it's a good idea that you specify it always. I don't know if you can specify it globally.

But if it suits your need you can use :as. From rails guide:

> **[Rails Routing from the Outside In — Ruby on Rails Guides](https://guides.rubyonrails.org/routing.html)**
>
> Rails Routing from the Outside InThis guide covers the user-facing features of Rails routing.After reading this guide, you will know: How to interpret the code in config/routes.rb. How to construct your own routes, using either the preferred...

map.resources :photos, :as =\> "images" will recognize incoming URLs containing image but route the requests to the Photos controller

Thanks, Abhinav
