adds Poll::Answer model for web users

PartialResults is kept for booth results
This commit is contained in:
Juanjo Bazán
2017-01-25 12:46:44 +01:00
parent 8f235c25d3
commit 6bc4f5b307
8 changed files with 58 additions and 14 deletions

View File

@@ -0,0 +1,15 @@
class CreatePollAnswers < ActiveRecord::Migration
def change
create_table :poll_answers do |t|
t.integer :question_id
t.integer :author_id
t.string :answer
t.timestamps
end
add_index :poll_answers, :question_id
add_index :poll_answers, :author_id
add_index :poll_answers, [:question_id, :answer]
end
end