My best guess at how to make this route
map.connect ‘:user’, :controller => ‘user’, :action => ‘profile’
makes my
link_to :controller => ‘admin’, :action => ‘index’
stop working ?
I’m needing urls like http://localhost:3000/username but without
breaking all my other controller index actions in the process.
Thanks.
Do you still have the map.connect ‘:controller/:action’ route at the
end?
On 7/23/06, Greg D. [email protected] wrote:
Rails mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails
–
Kind regards,
Nathaniel B.
President & CEO
Inimit Innovations Inc. - http://inimit.com
On 7/23/06, Nathaniel B. [email protected] wrote:
Do you still have the map.connect ‘:controller/:action’ route at the end?
I have map.connect ‘:controller/:action/:id’ at the end.
Can you post your complete routes file?
On 7/23/06, Andrew S. [email protected] wrote:
Can you post your complete routes file?
ActionController::Routing::Routes.draw do |map|
map.connect ‘:user’, :controller => ‘user’, :action => ‘profile’
map.connect ‘’, :controller => ‘home’
map.connect ‘:controller/:action/:id’
end
Back to your original question, when you say it breaks the other routes,
you
mean it puts them intoa query string formatted url?
Like ?
Also, just to give it a shot, move the new :user route you created after
the
last :controller/:action/:id route.
-NSHB
On 7/23/06, Greg D. [email protected] wrote:
–
Greg D.
http://destiney.com/
Rails mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails
–
Kind regards,
Nathaniel B.
President & CEO
Inimit Innovations Inc. - http://inimit.com
I think you could do this and it would work:
ActionController::Routing::Routes.draw do |map|
map.connect ‘’, :controller => ‘home’
map.connect ‘:controller/:action/:id’
map.connect ‘:user’, :controller => ‘user’, :action => ‘profile’
end
I’m no routes expert by any means, but I think this may open up some
issues
for you. If it’s an option, I think it would be best to do something
like:
http://localhost:3000/profile/username
good luck!