学生是否看到问卷结果老师可配置增加数据库

This commit is contained in:
sw 2015-01-23 14:10:38 +08:00
parent bb64dc9452
commit 6645648027
2 changed files with 10 additions and 0 deletions

View File

@ -47,6 +47,7 @@ class PollController < ApplicationController
:user_id => User.current.id, :user_id => User.current.id,
:published_at => Time.now, :published_at => Time.now,
:closed_at => Time.now, :closed_at => Time.now,
:show_result => 1,
:polls_description => "" :polls_description => ""
} }
@poll = Poll.create option @poll = Poll.create option

View File

@ -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