Sha256: 6fed23eb2d63b0e0435b44e3647dd5c9cead0f62cc0c9648eb12219a711ea39b
Contents?: true
Size: 369 Bytes
Versions: 30
Compression:
Stored size: 369 Bytes
Contents
class AddMoreTeams < ActiveRecord::Migration def self.up f = File.join(RAILS_ROOT, 'db', 'migrate', 'teams.txt') File.open(f) do |tf| while line = tf.gets line.chomp! name, short_name = line.split(', ') Team.create(:name => name, :short_name => short_name) end end end def self.down # Not reversible end end
Version data entries
30 entries across 30 versions & 1 rubygems