1
0

engine_extensions.rb 417 B

12345678910111213
  1. # frozen_string_literal: true
  2. module Rails
  3. module EngineExtensions
  4. # Rewrite task loading code to filter digitalocean.rake task
  5. def run_tasks_blocks(app)
  6. Railtie.instance_method(:run_tasks_blocks).bind_call(self, app)
  7. paths['lib/tasks'].existent.reject { |ext| ext.end_with?('digitalocean.rake') }.sort.each { |ext| load(ext) }
  8. end
  9. end
  10. end
  11. Rails::Engine.prepend(Rails::EngineExtensions)