I am using Ruby on Rails 3 and I would like to know how to manage a resource consisting of a “composed structure”. That is, if I have a User resource consisting of an Account class, a Profile class and a Setting class, I would like to “refer” to the User class to “reach” its child classes (Account, Profile, Setting the “common\best way“. Since I have a lot of classes in my Model-Controller-View structured application, I would like to “simplify” the file system structure in app/controllers, app/models and app/views folders and properly make the application to work.
What file I should create? How should I routes User resources? What else? Can you link some web resource about this issue?
If i understood properly what you are looking for is nested resources.
You will find a description at http://railscasts.com/episodes/139-nested-resources
and the details about routing in rails 3 at http://guides.rubyonrails.org/routing.html#nested-resources.
About where to put the files, just follow the rails conventions. What the user see has nothing to do with where the files are.