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.1.19 app/models/ecom/core/user_role.rb
ecom_core-1.1.18 app/models/ecom/core/user_role.rb
ecom_core-1.1.17 app/models/ecom/core/user_role.rb
ecom_core-1.1.16 app/models/ecom/core/user_role.rb
ecom_core-1.1.15 app/models/ecom/core/user_role.rb
ecom_core-1.1.14 app/models/ecom/core/user_role.rb
ecom_core-1.1.13 app/models/ecom/core/user_role.rb
ecom_core-1.1.12 app/models/ecom/core/user_role.rb
ecom_core-1.1.11 app/models/ecom/core/user_role.rb
ecom_core-1.1.10 app/models/ecom/core/user_role.rb
ecom_core-1.1.9 app/models/ecom/core/user_role.rb
ecom_core-1.1.8 app/models/ecom/core/user_role.rb
ecom_core-1.1.7 app/models/ecom/core/user_role.rb
ecom_core-1.1.6 app/models/ecom/core/user_role.rb
ecom_core-1.1.5 app/models/ecom/core/user_role.rb
ecom_core-1.1.4 app/models/ecom/core/user_role.rb
ecom_core-1.1.3 app/models/ecom/core/user_role.rb
ecom_core-1.1.2 app/models/ecom/core/user_role.rb
ecom_core-1.1.1 app/models/ecom/core/user_role.rb
ecom_core-1.1.0 app/models/ecom/core/user_role.rb