Invoke a rake task from another task
Simply call #invoke
task :invoke_another_task do
# some code
Rake::Task["another:task"].invoke
end
Written by Felipe Elias Philipp
Related protips
2 Responses
Much simpler, and more acceptable is:
task :invoke_another_task => %w[another:task one:another:task]
over 1 year ago
·
@hauleth yeah, I use this too :) but when you need more code around, this might be useful at some point
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Ruby
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#