Class: Dina::Collection
- Inherits:
-
BaseModel
- Object
- JsonApiClient::Resource
- BaseModel
- Dina::Collection
show all
- Defined in:
- lib/dina/models/material_sample/collection.rb
Class Method Summary
collapse
Methods inherited from BaseModel
custom_headers, #english_description, find_by_group, #french_description, #initialize, site
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
35
36
37
|
# File 'lib/dina/models/material_sample/collection.rb', line 35
def self.find_by_code(code)
where(code: code).all.first
end
|
.find_by_name(name) ⇒ Object
31
32
33
|
# File 'lib/dina/models/material_sample/collection.rb', line 31
def self.find_by_name(name)
where(name: name).all.first
end
|
.table_name ⇒ Object
27
28
29
|
# File 'lib/dina/models/material_sample/collection.rb', line 27
def self.table_name
"collection"
end
|