Interesting...I've been going through step by step with a small test app:
  1. multiple sub-directory in standard application => works OK using absolute "/" at the front of the controller value specified in a "link_to"
  2. installed engine plugin and moved the multiple sub-directory controller/view to my test engine => worked ok again with absolute value
  3. moved the links (link_to's) from the individual views to an application wide layout => seemed to work ok again
  4. introduced the :locale into the routes, and after some adjustments (i.e. putting in a default :locale of nil for each route) got this working too
In short using the (a) absolute path in the "link_to" and (b) appropriate use of a default :locale of nil, seem to have things working in a small test app.   I was getting errors previously in my full blown application when playing with some of these tweaks so I'm not sure what went wrong :(    I'll go back to my full blown application again and see if I can spot something.

Any comments?

Cheers
Greg

PS routes.rb file from test application
=====================================
ActionController::Routing::Routes.draw do |map|

  map.connect ':locale/singlelevel',
        :controller => 'single', :action ="" 'testaction', 
        :defaults => {:locale => 'nil'}
 
  map.connect ':locale/multilevel',
        :controller => 'parent/child', :action ="" 'testaction', 
        :defaults => {:locale => 'nil'}

  map.connect ':locale',
        :controller => 'single',  :action ="" 'index',
        :defaults => {:locale => 'nil'}

end
=====================================

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/rubyonrails-core
-~----------~----~----~----~------~----~------~--~---

Reply via email to