Sha256: 77166c69c85f8b86f31742e347174493f7965760d6e8c6fb5b16357e9e6ecbca
Contents?: true
Size: 408 Bytes
Versions: 17
Compression:
Stored size: 408 Bytes
Contents
class ActsAsVotableMigration < ActiveRecord::Migration def self.up create_table :votes do |t| t.references :votable, :polymorphic => true t.references :voter, :polymorphic => true t.boolean :vote_flag t.timestamps end add_index :votes, [:votable_id, :votable_type] add_index :votes, [:voter_id, :voter_type] end def self.down drop_table :votes end end
Version data entries
17 entries across 17 versions & 3 rubygems