So, there's been some commenting on the Routing Concerns that has been added to rails.https://github.com/rails/rails/commit/0dd24728a088fcb4ae616bb5d62734aca5276b1bThis seems to be adding no more functionality or ease of use than simply using methods, Ruby's standard form of reuse.Here's are links to comments about using methods:https://github.com/rails/rails/commit/0dd24728a088fcb4ae616bb5d62734aca5276b1b#commitcomment-1743800https://github.com/rails/rails/commit/0dd24728a088fcb4ae616bb5d62734aca5276b1b#commitcomment-1746912https://github.com/rails/rails/commit/0dd24728a088fcb4ae616bb5d62734aca5276b1b#commitcomment-1746901I don't see any added value that this adds. Would love to invite other comments and discussion on what this feature adds over just using Ruby.
...
Bam, now you are conflicting with https://github.com/rails/rails/blob/0dd24728a088fcb4ae616bb5d62734aca5276b1b/actionpack/lib/action_dispatch/routing/mapper.rb#L1414 and it can lead to a considerable amount of hair pulling. I don't think there is a way for us to detect such conflicts (or is there a way to define a method_added hook in the object singleton class?). Besides, the fact that the current router implementation is a bunch of modules with many private methods (don't get me started) just makes the chances of conflict higher.
Of the suggestions I have seen so far, I liked the lambda one the most. But then, I am a sucker for functional programming.