1
我有很多名爲example1_task,example1_task2等的rake腳本。我喜歡將這些腳本轉換爲一次,並使用example1:task1,example1:task2像我一樣使用命令rake db:migrate on軌道遷移。在rake任務上創建子項
有什麼想法?
在此先感謝。
我有很多名爲example1_task,example1_task2等的rake腳本。我喜歡將這些腳本轉換爲一次,並使用example1:task1,example1:task2像我一樣使用命令rake db:migrate on軌道遷移。在rake任務上創建子項
有什麼想法?
在此先感謝。
是,使用命名空間:
namespace "example" do
task :task1 do
#some code
end
task :task2 do
#some code
end
end
太好了!非常感謝! – jgiunta 2011-12-21 18:23:09