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.11 app/models/ecom/core/user_role.rb
ecom_core-1.2.10 app/models/ecom/core/user_role.rb
ecom_core-1.2.9 app/models/ecom/core/user_role.rb
ecom_core-1.2.7 app/models/ecom/core/user_role.rb
ecom_core-1.2.6 app/models/ecom/core/user_role.rb
ecom_core-1.2.5 app/models/ecom/core/user_role.rb
ecom_core-1.2.4 app/models/ecom/core/user_role.rb
ecom_core-1.2.3 app/models/ecom/core/user_role.rb
ecom_core-1.2.2 app/models/ecom/core/user_role.rb
ecom_core-1.2.1 app/models/ecom/core/user_role.rb
ecom_core-1.2.0 app/models/ecom/core/user_role.rb
ecom_core-1.1.28 app/models/ecom/core/user_role.rb
ecom_core-1.1.27 app/models/ecom/core/user_role.rb
ecom_core-1.1.26 app/models/ecom/core/user_role.rb
ecom_core-1.1.25 app/models/ecom/core/user_role.rb
ecom_core-1.1.24 app/models/ecom/core/user_role.rb
ecom_core-1.1.23 app/models/ecom/core/user_role.rb
ecom_core-1.1.22 app/models/ecom/core/user_role.rb
ecom_core-1.1.21 app/models/ecom/core/user_role.rb
ecom_core-1.1.20 app/models/ecom/core/user_role.rb