Sha256: 508da54e01c9939546a3b8dd8700f888533f148da8b19daf40215782aae3f597
Contents?: true
Size: 354 Bytes
Versions: 3
Compression:
Stored size: 354 Bytes
Contents
class AddDepthToPandaCMSMenus < ActiveRecord::Migration[7.2] def change add_column :panda_cms_menus, :depth, :integer, null: true, default: nil homepage = Panda::CMS::Page.find_by(path: "/") if homepage main_menu = Panda::CMS::Menu.find_by(start_page_id: homepage.id, kind: :auto) main_menu&.update(depth: 2) end end end
Version data entries
3 entries across 3 versions & 1 rubygems