1
0

engine_extensions.rb 386 B

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