# Manage address with no cotrollers

**URL:** <https://www.ruby-forum.com/t/manage-address-with-no-cotrollers/130387>\
**Category:** Rails\
**Created:** [February 27, 2008, 10:04pm UTC](https://www.ruby-forum.com/t/manage-address-with-no-cotrollers/130387 "2008-02-27T22:04:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![stratboy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/838e76/32.png) [@stratboy](https://www.ruby-forum.com/u/stratboy)\
**Post date:** [February 27, 2008, 10:04pm UTC](https://www.ruby-forum.com/t/manage-address-with-no-cotrollers/130387/1 "2008-02-27T22:04:31Z")

</div>

For examples.  
I have:

[examples.com/john](http://examples.com/john)

John isn’t a controller but an id

I want pass john to a method od a controllerfor example  
[examples.com/index/john](http://examples.com/index/john)

Is possible with rails and without .htaccess?  
Thanks

---

<div class="post-metadata">

**Author:** ![stratboy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/838e76/32.png) [@stratboy](https://www.ruby-forum.com/u/stratboy)\
**Post date:** [February 27, 2008, 10:10pm UTC](https://www.ruby-forum.com/t/manage-address-with-no-cotrollers/130387/2 "2008-02-27T22:10:31Z")

</div>

dont understand, are you trying to send the id to the method when  
someone clicks on something or through a form???  
Whats did you intend to happen when you pass the id to the controller?  
Oh and by the way, you have to pass to the controller, its impossible  
as far as i know to communicate directly with the model from the view.  
Then again, that might just be ingrained as a good practice.

On Feb 27, 4:04 pm, Luca R. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![stratboy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/838e76/32.png) [@stratboy](https://www.ruby-forum.com/u/stratboy)\
**Post date:** [February 27, 2008, 10:17pm UTC](https://www.ruby-forum.com/t/manage-address-with-no-cotrollers/130387/3 "2008-02-27T22:17:00Z")

</div>

> Is possible with rails and without .htaccess?  
> Yes.

You’ll want to setup a route something like:

map.connect ‘:id’, :controller =\> ‘mycontroller’, :action =\>  
‘myaction’

And you’ll want to think carefully about where that goes in your  
routes.rb  
so as not to mess up the default routes.
