migrations to integrate answers from attributes into questions
This commit is contained in:
parent
628211f0fc
commit
55cc1ec090
7 changed files with 167 additions and 1 deletions
9
db/migrate/20140308103633_add_yes_no_to_answers.rb
Normal file
9
db/migrate/20140308103633_add_yes_no_to_answers.rb
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue