Fix rake db:seed_fu ENV=development

This problem was reported on https://gitlab.com/gitlab-org/cookbook-gitlab/issues/46
This commit is contained in:
Hiroyuki Sato 2014-04-09 11:02:45 +09:00
parent 9a02e27b84
commit 0ed2f8ded9
1 changed files with 4 additions and 0 deletions

View File

@ -1,3 +1,5 @@
ActiveRecord::Base.observers.disable(:milestone_observer)
Milestone.seed(:id, [
{ id: 1, project_id: 1, title: 'v' + Faker::Address.zip_code },
{ id: 2, project_id: 1, title: 'v' + Faker::Address.zip_code },
@ -16,3 +18,5 @@ Milestone.all.map do |ml|
ml.set_iid
ml.save
end
ActiveRecord::Base.observers.enable(:milestone_observer)