Sha256: bfa8a99babda432e46c87afd93c0d3bb7f478ccaa234e7bc1c17765eb219c915
Contents?: true
Size: 570 Bytes
Versions: 19
Compression:
Stored size: 570 Bytes
Contents
module RocketCMS module Models module Menu extend ActiveSupport::Concern include RocketCMS::Model include Enableable include ManualSlug include RocketCMS.orm_specific('Menu') included do field :name, type: String manual_slug :name after_save do Rails.cache.delete 'menus' end after_destroy do Rails.cache.delete 'menus' end has_and_belongs_to_many :pages, inverse_of: :menus alias_method :items, :pages end end end end
Version data entries
19 entries across 19 versions & 1 rubygems