# Routing Problem please help

**URL:** <https://www.ruby-forum.com/t/routing-problem-please-help/155655>\
**Category:** Rails\
**Created:** [December 15, 2008, 11:11am UTC](https://www.ruby-forum.com/t/routing-problem-please-help/155655 "2008-12-15T11:11:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sameera](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/b487fb/32.png) [@sameera](https://www.ruby-forum.com/u/sameera)\
**Post date:** [December 15, 2008, 11:11am UTC](https://www.ruby-forum.com/t/routing-problem-please-help/155655/1 "2008-12-15T11:11:15Z")

</div>

Hi all,

I’m creating a REST API for one of my projects and I’m stuck in a  
routing issue.

I have a resource called mobileowner (which will send the user xml when  
given the mobile no)

And my controller is in the following path

app -\> controllers -\> api -\> mobileowner.

so can someone tell me how to configure this in my routs.rb file. (to  
work mobileowner as a resource).

I’m using rails 2.0.2

thankx in advance

cheers  
sameera

---

<div class="post-metadata">

**Author:** ![sameera](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/b487fb/32.png) [@sameera](https://www.ruby-forum.com/u/sameera)\
**Post date:** [December 15, 2008, 11:19am UTC](https://www.ruby-forum.com/t/routing-problem-please-help/155655/2 "2008-12-15T11:19:13Z")

</div>

map.namespace :api do |api|  
api.resources :mobileowners  
end

should be all you need.

---

<div class="post-metadata">

**Author:** ![sameera](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/b487fb/32.png) [@sameera](https://www.ruby-forum.com/u/sameera)\
**Post date:** [December 15, 2008, 11:51am UTC](https://www.ruby-forum.com/t/routing-problem-please-help/155655/3 "2008-12-15T11:51:07Z")

</div>

Thorsten M. wrote:

> map.namespace :api do |api|  
> api.resources :mobileowners  
> end
> 
> should be all you need.

Hi Thorsten,

Thats IT :))))

it worked… thankx you saved my day

thankx again

cheers  
sameera
