Fix generator command for nested (namespaced) rails engine (take 2) #27605
If we create nested (namespaced) rails engine such like bukkits-admin,
In #6643, we changed
Rewrite #27550 085546d was reverted (b6ffb5e) because it change the return of `namespaced_path` from String to Array. ---------------- If we create nested (namespaced) rails engine such like bukkits-admin, `bin/rails g scaffold User name:string age:integer` will create `bukkits-admin/app/controllers/bukkits/users_controller.rb` but it should create `bukkits-admin/app/controllers/bukkits/admin/users_controller.rb`. In #6643, we changed `namespaced_path` as root path because we supposed application_controller is always in root but nested rails engine's application_controller will not.