forked from AdaGold/task-list
-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f65ec6c
commit bea22c4
Showing
1 changed file
with
20 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
def random_time | ||
Time.at(rand * Time.now.to_i) | ||
end | ||
|
||
tasks = [ | ||
{ name: "The First Task", description: "", completed_at: random_time }, | ||
{ name: "Go to Brunch", description: "" }, | ||
{ name: "Go to Lunch", description: "", completed_at: random_time }, | ||
{ name: "Go to Second Lunch", description: "" }, | ||
{ name: "Play Video Games", description: "", completed_at: random_time }, | ||
{ name: "High Five Somebody You Don't Know", description: "", completed_at: random_time }, | ||
{ name: "Plant Flowers", description: "", completed_at: random_time }, | ||
{ name: "Call Mom", description: "" }, | ||
{ name: "She worries, you know.", description: "" }, | ||
{ name: "Nap.", description: "", completed_at: random_time } | ||
] | ||
|
||
tasks.each do |task| | ||
Task.create task | ||
end |