Method: Lines::ApplicationHelper#display_article_authors
- Defined in:
- app/helpers/lines/application_helper.rb
#display_article_authors(article, with_info = false) ⇒ Object
Returns HTML with all authors of an article
44 45 46 47 48 49 50 |
# File 'app/helpers/lines/application_helper.rb', line 44 def (article, with_info=false) = article..map{|| .gplus_profile.blank? ? .name : link_to(.name, .gplus_profile)}.to_sentence(two_words_connector: " & ", last_word_connector: " & ").html_safe if with_info += (" - " + article..map{|| content_tag(:span, "#{.description}", class: 'author_description') }.join(" -- ")).html_safe end end |