Module: TypeMaterialsHelper
- Defined in:
- app/helpers/type_materials_helper.rb
Instance Method Summary collapse
- #options_for_type_type_select ⇒ Object
- #type_material_link(type_material) ⇒ Object
- #type_material_tag(type_material) ⇒ Object
- #type_materials_search_form ⇒ Object
Instance Method Details
#options_for_type_type_select ⇒ Object
17 18 19 |
# File 'app/helpers/type_materials_helper.rb', line 17 def ((TypeMaterial::ICZN_TYPES.keys + TypeMaterial::ICN_TYPES.keys).uniq.sort, selected: 'holotype') end |
#type_material_link(type_material) ⇒ Object
8 9 10 11 |
# File 'app/helpers/type_materials_helper.rb', line 8 def type_material_link(type_material) return nil if type_material.nil? link_to(type_material_tag(type_material).html_safe, type_material) end |
#type_material_tag(type_material) ⇒ Object
3 4 5 6 |
# File 'app/helpers/type_materials_helper.rb', line 3 def type_material_tag(type_material) return nil if type_material.nil? [type_material.type_type, 'of', object_tag(type_material.protonym)].compact.join(' ') end |
#type_materials_search_form ⇒ Object
13 14 15 |
# File 'app/helpers/type_materials_helper.rb', line 13 def type_materials_search_form render('/type_materials/quick_search_form') end |