Commit Graph

2 Commits

Author SHA1 Message Date
Javi Martín
726110c91e Share Globalize JavaScript interface specs 2018-09-17 20:34:20 +02:00
Javi Martín
a64a290392 Extract commentable_path to an initializer
By doing so and including it in ActionDispatch::Routing::UrlFor, we make
it available in controllers, helpers and specs, and so we can remove the
duplication we had there with methods dealing with the same problem.

Even if monkey-patching is ugly, using a different module and executing
ActionDispatch::Routing::UrlFor.send(:include, MyModule) wouldn't make
the method available in the controller.
2018-09-17 20:28:55 +02:00