lib/routes_lazy_routes/application.rb
# 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.
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.
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 .
def load_tasks(*)
        super
        load "#{__dir__}/tasks/routes_lazy_routes.rake"
      end
def load_tasks ( * ) super load "#{__dir__}/tasks/routes_lazy_routes.rake" end
A monkey-patch that loads our Rake task for enhancing `rake routes` after Rails loads all other tasks.
A monkey - patch that loads our Rake task for enhancing ` rake routes ` after Rails loads all other tasks .