I am fairly new to rails, and have been through a few books, and am
now starting to sketch out an application, however I have run into a
problem with regards to the structure of the app.
I want to build an application that is setup in modules, and examples
of urls could be:
/Sales <- frontpage for sales
/Sales/Customers <- customer index
/Sales/Customer/123 <- Customer 123
/Sales/Invoices <- sales invoice index
/Sales/Invoice/123 <- show invoice 123
/Sales/Invoice/123/Post <- post action for the invoice
/Purchase <- frontpage for purchases
/Purchase/Vendors <- vendor index
/Settings/Currencies <- currency index
etc...
So in short, I would like to build the app with modules of sales,
purchase, inventory etc. What is the best way of setting this up? Do I
make a controller for each module, i.e. sales_controller,
purchase_controller or should I use namespaces and routes for this or
is there a better way?
Any help and best practices on this is very much appreciated.
Thanks in advance