创建答题选项

This commit is contained in:
huang 2017-07-21 14:21:10 +08:00
parent 52d27f1167
commit b4ff730229
2 changed files with 15 additions and 0 deletions

View File

@ -0,0 +1,3 @@
class ChallengeQuestion < ActiveRecord::Base
attr_accessible :challenge_id, :option, :position, :right_key
end

View File

@ -0,0 +1,12 @@
class CreateChallengeQuestions < ActiveRecord::Migration
def change
create_table :challenge_questions do |t|
t.text :option_name
t.integer :challenge_id
t.boolean :right_key
t.integer :position, :limit => 1
t.timestamps
end
end
end