Module: SubjModels::NomenclaturePhotoModule
- Includes:
- TypesSupport
- Defined in:
- lib/subj_models/nomenclature_photo.rb
Constant Summary
TypesSupport::BASE64_FORMAT
Class Method Summary
collapse
Instance Method Summary
collapse
Class Method Details
.included(including_class) ⇒ Object
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
# File 'lib/subj_models/nomenclature_photo.rb', line 11
def self.included(including_class)
including_class.class_eval do
include SubjModels::SharedScopes
include SubjModels::ComprisingExternalId
belongs_to :nomenclature
belongs_to :document_file
validates :document_file, presence: true
scope :nomenclature_id, -> (nomenclature_id) { parent_id_scope("nomenclature", nomenclature_id) }
end
end
|
Instance Method Details
#to_s ⇒ Object
30
31
32
|
# File 'lib/subj_models/nomenclature_photo.rb', line 30
def to_s
id.to_s end
|