Forum: Typo Simple Routing question

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.
Fff557ffbe33c6aab8aa17e1489fdaea?d=identicon&s=25 Harry Seldon (harry_seldon)
on 2009-02-28 00:38
I have added in my blog a controller called test_it to show some graphs
for OFC. The routes to reach it were simply like /test_it/index, that is
old routing style.
After the migration to Typo 5.2 and Rails 2.2 these routes were no
longer working. So I added these routes :
map.connect ':controller/:action'
map.connect ':controller/:action/:id.:format'

But these broke the tag route (see this post :
http://www.ruby-forum.com/topic/176700#773450)

Is there a simple way to activate this route just for the test_it
controller ?
The answer is probably simple but I don't know much about the routing
system.

Thx
H
2fd0206c71a1b22a9cc6293f38537461?d=identicon&s=25 Cyril Mougel (shingara)
on 2009-03-01 13:56
(Received via mailing list)
Harry Seldon a écrit :
>
> Is there a simple way to activate this route just for the test_it
> controller ?
> The answer is probably simple but I don't know much about the routing
> system.
>
In typo route there are a route with *from. this route get all route and
use to redirectcontroller. Create your route before this route and named
it.
Fff557ffbe33c6aab8aa17e1489fdaea?d=identicon&s=25 Harry Seldon (harry_seldon)
on 2009-03-01 14:07
Cyril Mougel wrote:
> Harry Seldon a �crit :
>>
>> Is there a simple way to activate this route just for the test_it
>> controller ?
>> The answer is probably simple but I don't know much about the routing
>> system.
>>
> In typo route there are a route with *from. this route get all route and
> use to redirectcontroller. Create your route before this route and named
> it.

OK. I am afraid of abusing, but can you remind me how to form a named
route ;-)
2fd0206c71a1b22a9cc6293f38537461?d=identicon&s=25 Cyril Mougel (shingara)
on 2009-03-01 15:11
(Received via mailing list)
Harry Seldon a écrit :
>> In typo route there are a route with *from. this route get all route and
>> use to redirectcontroller. Create your route before this route and named
>> it.
>>
>
> OK. I am afraid of abusing, but can you remind me how to form a named
> route ;-)
>
map.test_it '/test_it', :controller => 'Tests', :action => 'test'

test_it_url
Fff557ffbe33c6aab8aa17e1489fdaea?d=identicon&s=25 Harry Seldon (harry_seldon)
on 2009-03-01 15:26
Cyril Mougel wrote:
> Harry Seldon a écrit :
>>> In typo route there are a route with *from. this route get all route and
>>> use to redirectcontroller. Create your route before this route and named
>>> it.
>>>
>>
>> OK. I am afraid of abusing, but can you remind me how to form a named
>> route ;-)
>>
> map.test_it '/test_it', :controller => 'Tests', :action => 'test'
>
> test_it_url

Thx !
This topic is locked and can not be replied to.