Sha256: 6bee06329d2c3f1112bc2e9e9aed8711e90135aa70cf7fe844eb8a52ea91428c
Contents?: true
Size: 395 Bytes
Versions: 10
Compression:
Stored size: 395 Bytes
Contents
class Metaphones < ActiveRecord::Migration def self.up add_column :tags, :metaphone, :string add_column :tags, :metaphone_secondary, :string Tag.reset_column_information Tag.all.each do |tag| tag.send :save # metaphone is calculated before_save end end def self.down remove_column :tags, :metaphone remove_column :tags, :metaphone_secondary end end
Version data entries
10 entries across 10 versions & 1 rubygems