Hi. I am making an application and its going to have dozens of model
objects and maybe as many controllers.
I want to organize this stuff into logical directories … like I
used to do in Java (using the package declaration). I am interesting
in learning how RoR handles this seemingly common situation and also
what are best practices using Ruby in general.
Using ./script/generate model stuff/DebitCard
creates: app/models/stuff/debit_card.rb (sweet!)
However, using the generate script yields confusing results:
./script/generate scaffold stuff/Card admin/Banking debit credit
creates: app/models/card.rb and app/controllers/admin/
banking_controller.rb (the controller is in a sub dir called admin,
but Card is not in stuff)
Further, in the case of the former example, I see that the class
declaration is prefixed with Stuff:: but no module by this name is
created, so on first run the application pitches a NameError.
So, in general what steps should I take to create an organized model/