Sha256: bfa2702304ea6f1aad5ab8272c4a93e33557ab36288695c9533f51b2e4bfd8a6
Contents?: true
Size: 497 Bytes
Versions: 6
Compression:
Stored size: 497 Bytes
Contents
# frozen_string_literal: true class FixNilThresholdPerParagraph < ActiveRecord::Migration[5.1] class Component < ApplicationRecord self.table_name = :decidim_components end def change paragraph_components = Component.where(manifest_name: "paragraphs") paragraph_components.each do |component| settings = component.attributes["settings"] settings["global"]["threshold_per_paragraph"] ||= 0 component.settings = settings component.save end end end
Version data entries
6 entries across 6 versions & 1 rubygems