Module: ContentsHelper
- Defined in:
- app/helpers/contents_helper.rb
Instance Method Summary collapse
- #content_link(content) ⇒ Object
- #contents_search_form ⇒ Object
-
#taxon_works_content_tag(content) ⇒ Object
Note disambiguation from Rails’ content_tag().
Instance Method Details
#content_link(content) ⇒ Object
13 14 15 16 |
# File 'app/helpers/contents_helper.rb', line 13 def content_link(content) return nil if content.nil? link_to(taxon_works_content_tag(content), content) end |
#contents_search_form ⇒ Object
18 19 20 |
# File 'app/helpers/contents_helper.rb', line 18 def contents_search_form render('/contents/quick_search_form') end |
#taxon_works_content_tag(content) ⇒ Object
Note disambiguation from Rails’ content_tag()
4 5 6 7 8 9 10 11 |
# File 'app/helpers/contents_helper.rb', line 4 def taxon_works_content_tag(content) return nil if content.nil? content_tag(:span, title: MARKDOWN_HTML.render(content.text).html_safe ) do [ controlled_vocabulary_term_tag(content.topic.), otu_tag(content.otu) ].join(' - ').html_safe end end |