« Return to Thread: inconsistent routing

Re: inconsistent routing

by Sean Cribbs-2 :: Rate this Message:

Reply to Author | View in Thread

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
>>
>>    

_______________________________________________
Radiant mailing list
Post:   Radiant@...
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant

 « Return to Thread: inconsistent routing