Sha256: 4437c7df357ce2b510813445a4d6c6c5a1ae16ca9244048ca21da682090ab26a
Contents?: true
Size: 806 Bytes
Versions: 36
Compression:
Stored size: 806 Bytes
Contents
require 'subj_models/concerns/comprising_external_id' module SubjModels module UserSpecializationModule def self.included(including_class) including_class.class_eval do include SubjModels::ComprisingExternalId has_and_belongs_to_many :users has_and_belongs_to_many :access_groups has_and_belongs_to_many :events has_many :specialist_activity_document_types, dependent: :destroy has_many :user_specialization_approvals, dependent: :destroy has_many :nomenclatures validates :name, presence: true scope :user_id, -> (user_id) { parent_id_scope("user", user_id) } scope :unavailable_for_current_user, -> ids { where.not(id: ids) } end def to_s name.to_s end end end end
Version data entries
36 entries across 36 versions & 2 rubygems