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.2.31 app/models/ecom/core/user_role.rb
ecom_core-1.2.30 app/models/ecom/core/user_role.rb
ecom_core-1.2.29 app/models/ecom/core/user_role.rb
ecom_core-1.2.28 app/models/ecom/core/user_role.rb
ecom_core-1.2.27 app/models/ecom/core/user_role.rb
ecom_core-1.2.26 app/models/ecom/core/user_role.rb
ecom_core-1.2.25 app/models/ecom/core/user_role.rb
ecom_core-1.2.24 app/models/ecom/core/user_role.rb
ecom_core-1.2.23 app/models/ecom/core/user_role.rb
ecom_core-1.2.22 app/models/ecom/core/user_role.rb
ecom_core-1.2.21 app/models/ecom/core/user_role.rb
ecom_core-1.2.20 app/models/ecom/core/user_role.rb
ecom_core-1.2.19 app/models/ecom/core/user_role.rb
ecom_core-1.2.18 app/models/ecom/core/user_role.rb
ecom_core-1.2.17 app/models/ecom/core/user_role.rb
ecom_core-1.2.16 app/models/ecom/core/user_role.rb
ecom_core-1.2.15 app/models/ecom/core/user_role.rb
ecom_core-1.2.14 app/models/ecom/core/user_role.rb
ecom_core-1.2.13 app/models/ecom/core/user_role.rb
ecom_core-1.2.12 app/models/ecom/core/user_role.rb