Class: CreateNeutralVotes
- Inherits:
-
ActiveRecord::Migration
- Object
- ActiveRecord::Migration
- CreateNeutralVotes
- Defined in:
- lib/generators/neutral/install/templates/votes.rb
Instance Method Summary collapse
Instance Method Details
#change ⇒ Object
2 3 4 5 6 7 8 9 10 |
# File 'lib/generators/neutral/install/templates/votes.rb', line 2 def change create_table :neutral_votes do |t| t.belongs_to :voter t.belongs_to :voteable, polymorphic: true t.integer :value, null: false t. end end |