Sha256: 0994067d0466d91dfb0f43cb55538d4de5e28d978e5c887d557f65dd7b5a0ab9
Contents?: true
Size: 318 Bytes
Versions: 13
Compression:
Stored size: 318 Bytes
Contents
class UpgradeTaxons < ActiveRecord::Migration def self.up Taxonomy.find(:all).each do |taxonomy| next if (taxonomy.taxons.find_by_parent_id(nil)) taxon = Taxon.new(:name => taxonomy.name, :taxonomy_id => taxonomy.id, :position => 1 ) taxon.save end end def self.down end end
Version data entries
13 entries across 13 versions & 3 rubygems