diff options
author | 2010-08-06 18:20:35 +0200 | |
---|---|---|
committer | 2010-08-09 18:01:06 +0200 | |
commit | de786f350786a22e96a028f141d819d0bf574528 (patch) | |
tree | e65f3a783e2d8a462901831f5ea9f4e0a6e973a2 /db | |
parent | Add :null => false to required fields and relations in models. (diff) | |
download | recruiting-webapp-de786f350786a22e96a028f141d819d0bf574528.tar.gz recruiting-webapp-de786f350786a22e96a028f141d819d0bf574528.tar.bz2 recruiting-webapp-de786f350786a22e96a028f141d819d0bf574528.zip |
Bugfix - previous commit was tested unproperly and introduced some bugs
Answer can't enforce :null=>false on content field of answer because
when user answers multiple choice question and selects no options
his/her answer will have empty content field.
Diffstat (limited to 'db')
-rw-r--r-- | db/schema.rb | 4 | ||||
-rw-r--r-- | db/seeds.rb | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/db/schema.rb b/db/schema.rb index b79b86f..c988035 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -9,10 +9,10 @@ # # It's strongly recommended to check this file into your version control system. -ActiveRecord::Schema.define(:version => 20100805164943) do +ActiveRecord::Schema.define(:version => 20100809160102) do create_table "answers", :force => true do |t| - t.text "content", :null => false + t.text "content", :default => "", :null => false t.boolean "approved", :default => false t.boolean "reference", :default => false t.datetime "created_at" diff --git a/db/seeds.rb b/db/seeds.rb index afed2eb..4d06bc3 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -103,7 +103,7 @@ end ebuild_q = ['ebuild_q1', 'ebuild_q2', 'ebuild_q3'] mentor_q = ['mentor_q1', 'mentor_q2', 'mentor_q3'] -non_q = ['non_q1', 'non_q', 'non_q3'] +non_q = ['non_q1', 'non_q2'] # non-approved answers ans_hash = {:content => 'Some answer'} |