Thanks for your reply! makes a lot of sense.
In terms of folder structure, are there any pros / cons of putting nested resources controllers in their respective nested folders?
For example having your websites_controller in the controllers folder (controllers/websites_controller), then putting the pages_controller inside a folder such as controllers/websites/pages_controller.
Apologies for the long winded question, hope this makes sense.
I'm relatively new to rails so apologies if this is a very basic concept / been asked before, I've had a look around and can't really find any best practices for when to use nested controllers.
For example, If you had a "Websites" controller and a "Pages" controller, the pages wouldn't exist without the Website, so would these be nested together?
This would match the routes and seems to make sense from a logic standpoint.
Posted in How to use Hotwire in Rails Discussion