In this post I will explain how to run multiple rake tasks in sequence:
1./ Create an empty file in lib/tasks
2./ Name the file Something.rake (the .rake suffix is important).
3./ Then fill out your Ruby code within tasks, like so:
4./ Then run your rake task from the root of your Rails application:
and your rake tasks are performed in sequence.
Learn more about this subject from Ryan Bates at Railscasts or from Łukasz Wróbel.
No comments:
Post a Comment