以下のケースroutes.rbを簡単に表現したいと思います。
namespace :post do
namespace :p01 do
resources :p9_posts
end
end
namespace :post do
namespace :p01 do
resources :p8_posts
end
end
namespace :post do
namespace :p01 do
resources :p7_posts
end
end
namespace :post do
namespace :p01 do
resources :p6_posts
end
end
namespace :post do
namespace :p01 do
resources :p5_posts
end
end
namespace :post do
namespace :p01 do
resources :p4_posts
end
end
namespace :post do
namespace :p01 do
resources :p3_posts
end
end
namespace :post do
namespace :p01 do
resources :p2_posts
end
end
namespace :post do
namespace :p01 do
resources :p1_posts
end
end
namespace :post do
namespace :p01 do
resources :p0_posts
end
end
ループを使用する簡単な式を作成したいのですが、どうすればそれができますか
そしてまた下にも
namespace :post do
namespace :p10 do
resources :posts do
resources :comments
end
end
end
namespace :post do
namespace :p09 do
resources :posts do
resources :comments
end
end
end
namespace :post do
namespace :p08 do
resources :posts do
resources :comments
end
end
end
namespace :post do
namespace :p07 do
resources :posts do
resources :comments
end
end
end
namespace :post do
namespace :p06 do
resources :posts do
resources :comments
end
end
end
namespace :post do
namespace :p05 do
resources :posts do
resources :comments
end
end
end
namespace :post do
namespace :p04 do
resources :posts do
resources :comments
end
end
end
namespace :post do
namespace :p03 do
resources :posts do
resources :comments
end
end
end
namespace :post do
namespace :p02 do
resources :posts do
resources :comments
end
end
end
namespace :post do
namespace :p01 do
resources :posts do
resources :comments
end
end
end