[Radiant] inconsistent routing

Sean Cribbs seancribbs at gmail.com
Thu Feb 21 16:27:25 CST 2008


Benny,

Ah, sorry.  You might try assert_routing, which does both a generation 
and a recognition assertion.  Now, I don't know if it has anything to do 
with your problem, but I have found that it's more reliable to use named 
or resource routes in extensions.  I'm not sure if this is a Radiant 
issue or a Rails issue.  Try naming those and see if it becomes more 
consistent.

Sean

Benny Degezelle wrote:
> Nope, i'm still getting the same results; sometimes works, sometimes
> doesn't.
>
> the assert_recognizes didn't seem to work that way, i had to switch the 
> first part ('/en/shop') and the options to get those to pass
>
> Sean Cribbs wrote:
>   
>> Benny,
>>
>> Try this:
>>
>> define_routes do |map|
>>     map.with_options :controller => 'shop', :action => 'index' do |shop|
>>       shop.connect "en/shop/:action/:id", :language => 'en-US'
>>       shop.connect "nl/shop/:action/:id", :language => 'nl-BE'
>>     end
>> end
>>
>>     




More information about the Radiant mailing list