I'm developing online game (Heroes fighting against Clans) and i'm
planning next structure of my app: i've got top-level resources Heroes
(profiles of supermembers) and Clans (profiles of groups of members).
i've got both HeroesController and ClansController.
What i wanna do is give Heroes and Clans' leaders opportunities to add
"Content Resources" to their profile area or to the clan area,
respectively. "Content Resources" is different singular resources such
as Gallery, Blog, Shop and others. So Gallery has many Photoalbums
have many Photos), Blog has many Posts, Shop has goods and so on.
Hero can turn on/off each of singular Content Resources, and after
he get its full functionallity on his own profile page
The same thing with Clans - clan leader can connect in settings area
So the question is how to organize this structure well. I think about
resources :clans do
scope :module => 'blog' do
resource :blog do
scope :module => 'gallery' do
resource :gallery do
resources :heroes do
.. the same things...
And here i've got a first problem - when i run
/clan/1/blog/posts and even /clan/1/blog/posts/1/edit it all goes
but it fails in simple /clan/1/blog saying: [No route matches
May be i'm doing everything wrong. May be i should choose another way
instead of nested resources and/or namespaces, because i've heard it
may be a bad practice
I'm new in Rails, and i'm sorry for maybe easy questions
Grateful for any help, suggestions and advises!