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.0.5 app/models/ecom/core/user_role.rb
ecom_core-1.0.4 app/models/ecom/core/user_role.rb
ecom_core-1.0.3 app/models/ecom/core/user_role.rb
ecom_core-1.0.2 app/models/ecom/core/user_role.rb
ecom_core-1.0.1 app/models/ecom/core/user_role.rb
ecom_core-1.0.0 app/models/ecom/core/user_role.rb