lib/generators/neutral/install/templates/votings.rb in neutral-0.0.7 vs lib/generators/neutral/install/templates/votings.rb in neutral-0.0.8
- old
+ new
@@ -1,9 +1,8 @@
class CreateNeutralVotings < ActiveRecord::Migration
def change
create_table :neutral_votings do |t|
- t.string :votingable_type
- t.integer :votingable_id
+ t.belongs_to :votingable, polymorphic: true
t.integer :positive, default: 0
t.integer :negative, default: 0
t.timestamps
end