Sha256: 687ae6ef4a4b24a72799a132dc5dc5ee53934a2a17f6b5658f6619fa40fd6a40
Contents?: true
Size: 824 Bytes
Versions: 3
Compression:
Stored size: 824 Bytes
Contents
# -*- encoding : utf-8 -*- class MenuCompatibility < Card::CoreMigration def up # Add bootswatch shared to old skins so that menu works bootswatch_shared = Card[:bootswatch_shared] Card.search(:type_id=>Card::SkinID) do |skin| if skin.item_cards.find { |item_card| item_card.codename.to_s == 'style_bootstrap_compatible'} skin.add_item bootswatch_shared.name skin.save! end end # Delete output files so all the styling and js changes take effect. # (this can be removed if/when later migrations update those things directly) [:style, :script].each do |setting| Card.search( :right_id=>Card::MachineOutputID, :left=>{ :right=>{:codename=>setting.to_s } } ).each do |output_card| output_card.delete! end end end end
Version data entries
3 entries across 3 versions & 1 rubygems