Module: RoutesLazyRoutes::Application::TaskLoader
- Defined in:
- lib/routes_lazy_routes/application.rb
Instance Method Summary collapse
-
#load_tasks ⇒ Object
A monkey-patch that loads our Rake task for enhancing
rake routesafter Rails loads all other tasks.
Instance Method Details
#load_tasks ⇒ Object
A monkey-patch that loads our Rake task for enhancing rake routes after Rails loads all other tasks.
Just declaring our own rake_tasks in the railtie cannot achieve this, since calling each railtie's rake_tasks is done before requiring "rails/tasks",
so enhancing Rails' Rake task from a gem this way seems impossible.
18 19 20 21 22 |
# File 'lib/routes_lazy_routes/application.rb', line 18 def load_tasks(*) super load "#{__dir__}/tasks/routes_lazy_routes.rake" end |