How does a monkey attack a rake task sent with Rails?

I just found an error in one of the rake tasks shipped with Rails. Is there a way to decapitate a rake task?

+3
source share
1 answer

Yes.

You can do something like this:

Rake::Task['doc:app'].clear

and then define your own task

namespace :doc do
  task :app do
    # work your magic
  end
end
+6
source

Source: https://habr.com/ru/post/1736207/


All Articles