no2w6g
Last Updated: February 25, 2016
·
1.228K
· felipeelias
F6faa607e4f541da71fbf8aea6f99a7a

Invoke a rake task from another task

Simply call #invoke

task :invoke_another_task do
  # some code
  Rake::Task["another:task"].invoke
end
Say Thanks
Respond

2 Responses
Add your response

2354
Me

Much simpler, and more acceptable is:

task :invoke_another_task => %w[another:task one:another:task]
over 1 year ago ·
2355
F6faa607e4f541da71fbf8aea6f99a7a

@hauleth yeah, I use this too :) but when you need more code around, this might be useful at some point

over 1 year ago ·