学生是否看到问卷结果老师可配置增加数据库
This commit is contained in:
parent
bb64dc9452
commit
6645648027
|
@ -47,6 +47,7 @@ class PollController < ApplicationController
|
|||
:user_id => User.current.id,
|
||||
:published_at => Time.now,
|
||||
:closed_at => Time.now,
|
||||
:show_result => 1,
|
||||
:polls_description => ""
|
||||
}
|
||||
@poll = Poll.create option
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
class AddShowResult < ActiveRecord::Migration
|
||||
def up
|
||||
add_column :polls, :show_result, :integer, default: 1
|
||||
end
|
||||
|
||||
def down
|
||||
remove_column :polls, :show_result
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue