module RoutesLazyRoutes::Application::TaskLoader

Public Instance Methods

load_tasks(*) click to toggle source

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.

Calls superclass method
# File lib/routes_lazy_routes/application.rb, line 18
def load_tasks(*)
  super

  load "#{__dir__}/tasks/routes_lazy_routes.rake"
end