Forum: Ruby on Rails link_to mapped urls

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Bab1a2e4449e412ede5696e9b2539c55?d=identicon&s=25 [s] (Guest)
on 2006-04-20 23:00
(Received via mailing list)
Hi all,

I want my link_to links direct to my mapped urls, not the long ones with
controllers and actions in them.

What I have:

in view:
<%= link_to "random url", random_url %>

routes.rb:
map.random 'random', :controller => 'start', :action => 'random'

link_to results in "http://localhost:3001/start/random"
and I want it to point to "http://localhost:3001/random"

What am I doing wrong?
I looked in named routes docs, link_to docs etc. but either I search in
the
wrong place or it's magically hidden (I'd bet on the first one but I
really
tried).

Sabon
This topic is locked and can not be replied to.