Sha256: e2be2b3ec4cb9746b4bab705352d5bb455b3b9df3e15b99151feeada1f9f1427

Contents?: true

Size: 520 Bytes

Versions: 11

Compression:

Stored size: 520 Bytes

Contents

module Mks
  module Auth
    # A model class to represent menu items of a module
    class Menu < ApplicationRecord
      belongs_to :application_module, class_name: 'Mks::Auth::ApplicationModule'
      belongs_to :parent, class_name: 'Mks::Auth::Menu', optional: true
      has_many :children, class_name: 'Mks::Auth::Menu', foreign_key: 'parent_id'
      has_and_belongs_to_many :roles, class_name: 'Mks::Auth::UserRole',
                                      join_table: 'mks_auth_menus_user_roles'
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
mks_auth-1.0.14 app/models/mks/auth/menu.rb
mks_auth-1.0.13 app/models/mks/auth/menu.rb
mks_auth-1.0.12 app/models/mks/auth/menu.rb
mks_auth-1.0.11 app/models/mks/auth/menu.rb
mks_auth-1.0.10 app/models/mks/auth/menu.rb
mks_auth-1.0.9 app/models/mks/auth/menu.rb
mks_auth-1.0.8 app/models/mks/auth/menu.rb
mks_auth-1.0.7 app/models/mks/auth/menu.rb
mks_auth-1.0.6 app/models/mks/auth/menu.rb
mks_auth-1.0.5 app/models/mks/auth/menu.rb
mks_auth-1.0.4 app/models/mks/auth/menu.rb