Class: Material::List
- Inherits:
-
Collectible::CollectionBase
- Object
- Collectible::CollectionBase
- Material::List
show all
- Includes:
- Components, For, Icon, Site, Text
- Defined in:
- lib/material/list.rb
Constant Summary
Constants included
from For
For::LOOKUP_NAME
Constants included
from Text
Text::DEFAULT_TRUNCATE_LENGTH
Class Method Summary
collapse
Instance Method Summary
collapse
Class Method Details
.for(object) ⇒ Object
15
16
17
18
19
20
|
# File 'lib/material/list.rb', line 15
def self.for(object)
material_class = material_class_for(object, "List")
return unless material_class.present?
material_class.new(object)
end
|
Instance Method Details
#default_title ⇒ Object
22
23
24
|
# File 'lib/material/list.rb', line 22
def default_title
(item_class.try(:model_name)&.human || item_class&.name).pluralize || self.class.name
end
|