migrations to integrate answers from attributes into questions

This commit is contained in:
Stella 2014-03-08 18:37:41 +02:00
parent 628211f0fc
commit 55cc1ec090
7 changed files with 167 additions and 1 deletions

View file

@ -0,0 +1,9 @@
class AddYesNoToAnswers < ActiveRecord::Migration
def change
answer_yes = Answer.where(:title => "Yes").first
Answer.create(:title => "Yes") if answer_yes == nil
answer_no = Answer.where(:title => "No").first
Answer.create(:title => "No") if answer_no == nil
end
end