Newer
Older
dmpopidor / db / migrate / 20150809210811_add_field_to_questions.rb
@Marta Ribeiro Marta Ribeiro on 3 Jun 2016 265 bytes DMPonline4 - RAILS 4.0 (#4)
class AddFieldToQuestions < ActiveRecord::Migration
  def change
    add_column :questions, :option_comment_display, :boolean, :default => true
    Question.find_each do |question|
      question.option_comment_display = true
      question.save!
    end
  end
end