organize phoenix routes like we do with mix configs
novaugust opened this issue · 2 comments
novaugust commented
- sort by path, controller, action, dsl_name
- remove scope which only set a path, and add that path to the children (implicit grouping no longer needed as styler will maintain the grouping)
will probably just ship this as a task that can be run in isolation to start with, letting people use it once and then put things how they want them otherwise
novaugust commented
an example of why we wouldn't want to do this:
get("/request_anonymization", UserController, :request_anonymization)
get("/cancel_anonymization", UserController, :cancel_anonymization)
sure, it would've been better if the author had done get "/anonymization/request"
but we don't choose the code we inherit ^.^
Gladear commented
Just stumbled across this issue : I personally think this is a good idea, however I think grouping by controller first would be nice - then path, action, dsl_name. Controllers should be a nice heuristic to find related paths, and it solves the problem raised in your comment.