cookpad/chanko

New features

domaindrivendev opened this issue · 2 comments

Hi there

I might be missing something but am wondering what the best practice would be when prototyping a feature that requires "new" routes and controllers. The readme covers scenarios where the feature is implemented as an extension to existing controllers, models and views but I don't see a story for units that include new routes and controllers. I guess what I was expecting to see for this was some kind of :routes scope?

Is this something that you've considered and if so can you provide some guidance?

Thanks

Richie

As you said, the current version of Chanko has a fundamental lack of creating an entirely new set of routing & controller. In COOKPAD, we add a new routing into config/routes.rb and create a new controller in app/controllers in that situation, switching behavior by checking unit(:foo_unit).active? in before_action. But I also think this is not so good for prototyping 😇

To make it possible to add a new router & controller in a unit seems a good solution for me.
Any thoughts? > @cookpad/owners

I'm sorry for late replying. As you say, Chanko does not cover new routes and controllers. I could not solve it while keeping in mind readability and maintainability 6 years ago.

However I am not in a trouble and I am still using Chanko. Most important concept of Chanko is that "Remove codes without trouble when it becomes unnecessary". When thinking so, as it is now, I can delete added routes and added controllers without trouble.