Sha256: fd6647261b58da08a65d94b980706cd50db05b53be345f68b87854b055ba4cda

Contents?: true

Size: 386 Bytes

Versions: 106

Compression:

Stored size: 386 Bytes

Contents

module Ecom
  module Core
    class UserRole < ApplicationRecord
      belongs_to :application_module
      has_and_belongs_to_many :users, join_table: 'ecom_core_users_user_roles'
      has_and_belongs_to_many :menus, join_table: 'ecom_core_menus_user_roles'

      validates :name, presence: true
      validates :name, uniqueness: { scope: :application_module_id }
    end
  end
end

Version data entries

106 entries across 106 versions & 1 rubygems

Version Path
ecom_core-1.3.14 app/models/ecom/core/user_role.rb
ecom_core-1.3.13 app/models/ecom/core/user_role.rb
ecom_core-1.3.12 app/models/ecom/core/user_role.rb
ecom_core-1.3.11 app/models/ecom/core/user_role.rb
ecom_core-1.3.10 app/models/ecom/core/user_role.rb
ecom_core-1.3.9 app/models/ecom/core/user_role.rb
ecom_core-1.3.8 app/models/ecom/core/user_role.rb
ecom_core-1.3.7 app/models/ecom/core/user_role.rb
ecom_core-1.3.6 app/models/ecom/core/user_role.rb
ecom_core-1.3.5 app/models/ecom/core/user_role.rb
ecom_core-1.3.4 app/models/ecom/core/user_role.rb
ecom_core-1.3.3 app/models/ecom/core/user_role.rb
ecom_core-1.3.2 app/models/ecom/core/user_role.rb
ecom_core-1.3.1 app/models/ecom/core/user_role.rb
ecom_core-1.3.0 app/models/ecom/core/user_role.rb
ecom_core-1.2.36 app/models/ecom/core/user_role.rb
ecom_core-1.2.35 app/models/ecom/core/user_role.rb
ecom_core-1.2.34 app/models/ecom/core/user_role.rb
ecom_core-1.2.33 app/models/ecom/core/user_role.rb
ecom_core-1.2.32 app/models/ecom/core/user_role.rb