Sha256: b471dc0664c30c5f469af2c79d4010f1fd0f2348a5b38dc763b370390fc24976
Contents?: true
Size: 860 Bytes
Versions: 12
Compression:
Stored size: 860 Bytes
Contents
# -*- encoding : utf-8 -*- class ReorganizeScripts < Cardio::Migration::Core def up create_or_update! name: "*machine cache", codename: "machine_cache" ensure_card name: "script: mods", type_id: Card::PointerID, codename: "script_mods" ensure_card name: "script: editors", type_id: Card::PointerID, codename: "script_editors" update_script_rules end def update_script_rules Card.search(type_id: Card::PointerID, right: { codename: "script" }, link_to: "script: slot").each do |script_rule| %i[script_tinymce script_ace bootstrap_js].each do |codename| name = Card[codename].name script_rule.drop_item name end script_rule.add_item "script: editors" script_rule.add_item "script: mods" script_rule.save! end end end
Version data entries
12 entries across 12 versions & 1 rubygems