view db/seeds.rb @ 141:ab75f33dcc6f luisf

Issue #31: issue submitters and assignees are added to the watchers list. incomplete: there is no option to select/unselect the assignee.
author luisf
date Thu, 20 Jan 2011 13:08:43 +0000
parents 596803cb34fc
children da7cba64948d
line wrap: on
line source
# This file should contain all the record creation needed to seed the database with its default values.
# The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).
#
# Examples:
#   
#   cities = City.create([{ :name => 'Chicago' }, { :name => 'Copenhagen' }])
#   Major.create(:name => 'Daley', :city => cities.first)

Institution.delete_all

open("db/seed_data/institutions.txt") do |institutions|
  institutions.read.each_line do |institution|
    Institution.create(:name => institution.chomp)
  end
end