
I see many project get nested routes wrong. Developers do not use Ruby modules to reflect the relationship between the parent and children nesting of controllers. Here is an example of the wrong way (IMHO). Let’s say we have a customer and the customer has_many orders and has_one profile. Some developers will represent it like this.
/customers path in the file app/controllers/customers_controller.rb
class CustomersController < ApplicationController
def index
...
end
end








