Skip to content

Instantly share code, notes, and snippets.

@vestige
Created November 24, 2012 11:04
Show Gist options
  • Select an option

  • Save vestige/4139197 to your computer and use it in GitHub Desktop.

Select an option

Save vestige/4139197 to your computer and use it in GitHub Desktop.
seed.rb
# -*- encoding: UTF-8 -*-
names = [ "切手を買う", "報告書を書く", "家賃を払う", "猫の餌を買う", "燃えないゴミを出す"
]
description = "これは説明です。" * 20
5.times do |n|
Task.create(:name => names[n], :description => description,
:due_date => (n - 2).days.from_now, :done => n.zero?)
end
200.times do |n|
Task.create(:name => "Task #{n}", :description => description,
:due_date => (n + 3).days.from_now, :done => false)
end
%w(work life hobby).each do |name|
Category.create(:name => name)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment