创建答题选项
This commit is contained in:
parent
52d27f1167
commit
b4ff730229
|
|
@ -0,0 +1,3 @@
|
|||
class ChallengeQuestion < ActiveRecord::Base
|
||||
attr_accessible :challenge_id, :option, :position, :right_key
|
||||
end
|
||||
|
|
@ -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
|
||||
Loading…
Reference in New Issue