Sha256: 61c17201e560ae32c3bc3430cafb6295bffd26f89094eed0fd08ffd749af80d3
Contents?: true
Size: 469 Bytes
Versions: 7
Compression:
Stored size: 469 Bytes
Contents
# frozen_string_literal: true module Katalyst module Navigation # STI base class for menu items (links and buttons) class Item < ApplicationRecord belongs_to :menu, inverse_of: :items, class_name: "Katalyst::Navigation::Menu" after_initialize :initialize_tree attr_accessor :parent, :children, :index, :depth private def initialize_tree self.parent ||= nil self.children ||= [] end end end end
Version data entries
7 entries across 7 versions & 1 rubygems