Complicated route

Hello Friends,
I have a requirement where I want to have a dynamic url for e.g

http://localhost:3000/company_name

map.my_company_link’ ‘/:company_link’,
:controller => “companies”,
:action => “show”,
:requirements => {:company_link’ => /[\w.]+/}

This works very fine.

But the complication is that now all request is going towards *companies
controller *and show action, I know basically whats the problem Not
not
able to get the proper solution.

Please let me know if any one else faced the same issue.

Thanks
Abhis

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 [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.

ok

map.connect ‘/:company_link’,
:controller => “companies”,
:action => “show”,
:requirements => {:company_link’ => /[\w.]+/}

This worked for me :slight_smile:

Thanks
Abhis

On Mon, Dec 21, 2009 at 10:44 AM, Abhishek shukla
[email protected]wrote:

This works very fine.

But the complication is that now all request is going towards *companies
controller *and show action, I know basically whats the problem Not not
able to get the proper solution.

Please let me know if any one else faced the same issue.

Thanks
Abhis

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 [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.