Sha256: f6054be068240ec85b600cd578c376522e5c3283373e6cd91f353d3dedf73b90
Contents?: true
Size: 492 Bytes
Versions: 88
Compression:
Stored size: 492 Bytes
Contents
# frozen_string_literal: true class FixNilThresholdPerProposal < ActiveRecord::Migration[5.1] class Component < ApplicationRecord self.table_name = :decidim_components end def change proposal_components = Component.where(manifest_name: "proposals") proposal_components.each do |component| settings = component.attributes["settings"] settings["global"]["threshold_per_proposal"] ||= 0 component.settings = settings component.save end end end
Version data entries
88 entries across 88 versions & 1 rubygems