Sha256: ef455d5c72dc20dad38c989cf589f6093be9a0e41bc180be2354e99ec6cd97b7
Contents?: true
Size: 628 Bytes
Versions: 2
Compression:
Stored size: 628 Bytes
Contents
class ActsAsTaggableOn < ActiveRecord::Migration def self.up create_table :tags do |t| t.column :name, :string end create_table :taggings do |t| t.column :tag_id, :integer t.column :taggable_id, :integer t.column :tagger_id, :integer t.column :tagger_type, :string # You should make sure that the column created is # long enough to store the required class names. t.column :taggable_type, :string t.column :context, :string t.column :created_at, :datetime end add_index :taggings, :tag_id end def self.down end end
Version data entries
2 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
content_engine-0.1.0 | db/migrate/20100225112236_acts_as_taggable_on.rb |
content_engine-0.1.0 | spec/rails_app/db/migrate/20100225112236_acts_as_taggable_on.rb |