[Radiant] inconsistent routing

Sean Cribbs seancribbs at gmail.com
Thu Feb 21 13:42:23 CST 2008


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

My guess is that without the "default" action of 'index', it doesn't 
match.  You can test these in a functional test:

def test_shop_routing_with_language
  assert_recognizes "/en/shop", :controller => "shop", :action => 
"index", :language => 'en-US'
  assert_recognizes "/nl/shop", :controller => "shop", :action => 
"index", :language => 'nl-BE'
  # etc...
end

Sean

Benny Degezelle wrote:
> ;
>   define_routes do |map|
>     map.connect "en/shop/:action/:id", :controller => 'shop', :language 
> => 'en-US'
>     map.connect "nl/shop/:action/:id", :controller => 'shop', :language 
> => 'nl-BE'
>   end
>
> Sean Cribbs wrote:
>   
>> Benny,
>>
>> Would you paste us the route definitions?
>>
>> Sean
>>     
>
>   




More information about the Radiant mailing list