Fixes time log entry generation.

Previously, it was possible to have no activities, [].sample would be
nil. This is now fixed by always having five activities.
pull/356/head
Martin Czuchra 11 years ago
parent da7d342110
commit a90c6ff825
  1. 2
      db/seeds/development.rb

@ -67,7 +67,7 @@ wiki = Wiki.create project: project, start_page: "Seed"
time_entry_activities = [] time_entry_activities = []
rand(5).times do 5.times do
time_entry_activity = TimeEntryActivity.create name: Faker::Lorem.words(2).join(" ") time_entry_activity = TimeEntryActivity.create name: Faker::Lorem.words(2).join(" ")
time_entry_activity.save! time_entry_activity.save!

Loading…
Cancel
Save