Class: Dina::Collection
- Defined in:
- lib/dina/models/material_sample/collection.rb
Class Method Summary collapse
- .endpoint_path ⇒ Object
-
.find_by_code(code:) ⇒ Object
Finds a Collection object by code.
-
.find_by_name(name) ⇒ Object
Finds a Collection object by name.
- .table_name ⇒ Object
Methods inherited from BaseModel
custom_headers, find_by_group, #initialize, properties, site
Constructor Details
This class inherits a constructor from Dina::BaseModel
Class Method Details
.endpoint_path ⇒ Object
23 24 25 |
# File 'lib/dina/models/material_sample/collection.rb', line 23 def self.endpoint_path "collection-api/" end |
.find_by_code(code:) ⇒ Object
Finds a Collection object by code
43 44 45 |
# File 'lib/dina/models/material_sample/collection.rb', line 43 def self.find_by_code(code:) where(code: code).all end |
.find_by_name(name) ⇒ Object
Finds a Collection object by name
35 36 37 |
# File 'lib/dina/models/material_sample/collection.rb', line 35 def self.find_by_name(name) where(name: name).all end |
.table_name ⇒ Object
27 28 29 |
# File 'lib/dina/models/material_sample/collection.rb', line 27 def self.table_name "collection" end |