I have this structure of my view folders (they display the logis structure):

so I have a subfolder in the admin subfolder, that in the directories folder I have a subfolder, manufacturer, etc. (the manufacturer and the other have a controller with views, only directories and empty)
and the rails automatically generated the following routes for me:
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
manufacturers, models, types work fine, but the articles work weird ... When I try to write this form partially:
= 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 => "btn btn-primary"
something bad, I get the undefined method `admin_catalogs_to_manufacturers_models_types_to_articles_path 'for # <#: 0xbbedf60>
but, for example, in types I have this form:
= 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 => "btn btn-danger" = link_to '', :back, :class => "btn"
and all right, what's wrong with the articles? How and what to change on my route and optimize it? I try a little, but I get errors ...