Sha256: d67739c24c9eabbbc42215826271cbea6c712ecca3c72bb70a286bf1770686b8
Contents?: true
Size: 398 Bytes
Versions: 1
Compression:
Stored size: 398 Bytes
Contents
# frozen_string_literal: true class AddQuestionnaireToExistingMeetings < ActiveRecord::Migration[5.2] def change Decidim::Meetings::Meeting.transaction do Decidim::Meetings::Meeting.find_each do |meeting| if meeting.questionnaire.blank? meeting.update!( questionnaire: Decidim::Forms::Questionnaire.new ) end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
decidim-meetings-0.16.0 | db/migrate/20181107175558_add_questionnaire_to_existing_meetings.rb |