title: Rails routing with subfolders
body: <p>I have such structure of my view folders (they display logis structure):</p>
  
  <p><img src="https://i.stack.imgur.com/oRfAa.png" alt="dir"></p>
  
  <p>so i have subfolder in admin subfolder, that in catalogs folder i have to subfolder, manufacturer etc (manufacturer and other have there controller's with views, only catalogs and to are empty)</p>
  
  <p>and rails automatically generated me such routes:</p>
  
  <pre><code> namespace :admin do
     namespace :catalogs do
       namespace :to do
         namespace :manufacturers do
           namespace :models do
             namespace :types do
               resources :articles
             end
           end
         end
       end
     end
   end
  
   namespace :admin do
     namespace :catalogs do
       namespace :to do
         namespace :manufacturers do
           namespace :models do
             resources :types
           end
         end
       end
     end
   end
  
   namespace :admin do
     namespace :catalogs do
       namespace :to do
         namespace :manufacturers do
           resources :models
         end
       end
     end
   end
  
   namespace :admin do
     namespace :catalogs do
       namespace :to do
         resources :manufacturers
       end
     end
   end
  </code></pre>
  
  <p>manufacturers, models, types work normally, but articles work strange... When i try to write such form partial:</p>
  
  <pre><code>= form_for [:admin, :catalogs, :to, :manufacturers, :models, :types, @art] do |f|
    = f.label "OEM"
    = f.text_field :oem_number
    = f.label "Бренд"
    = f.text_field :manufacturer
    = f.label "Название"
    = f.text_area :name
    = f.label "Кол-во"
    = f.text_field :quantity
    = f.label "Комментарий"
    = f.text_area :details
    = f.label "Только с VIN"
    = f.check_box :only_with_vin
    = f.hidden_field :type_id, @type_id
    .form-actions
      = f.submit 'Сохранить изменения', :class =&gt; "btn btn-primary"
  </code></pre>
  
  <p>something is bad, i get 
  undefined method `admin_catalogs_to_manufacturers_models_types_to_articles_path' for #&lt;#:0xbbedf60></p>
  
  <p>but for example in types i have such form:</p>
  
  <pre><code>= form_for [:admin, :catalogs, :to, :manufacturers, :models, @man] do |f|  
    %b
      = @man.Name
    %br
    = @man.TYP_PCON_START.to_s[4...6].concat("-").concat(@man.TYP_PCON_START.to_s[0...4])
    \-  
    -if @man.TYP_PCON_END.blank?
      = "наст. время"
    -else
      = @man.TYP_PCON_END.to_s[4...6].concat("-").concat(@man.TYP_PCON_END.to_s[0...4])
    %br
    = ((@man.TYP_HP_FROM.to_f*0.74).round).to_i
    kW
    = f.label "Отображать в списке ТО?"
    = f.check_box :is_in_to
    .form-actions
      = f.submit 'Сохранить', :class =&gt; "btn btn-danger"
      = link_to 'Назад', :back, :class =&gt; "btn"
  </code></pre>
  
  <p>and all is ok, what's wrong with articles? How and what to change in my route and optimize it? I try a little bit, but get errors...</p>