Module: JournalHelper
- Defined in:
- app/helpers/journal_helper.rb
Instance Method Summary collapse
Instance Method Details
#journal_post_category_links(post) ⇒ Object
2 3 4 5 6 7 8 9 10 11 12 |
# File 'app/helpers/journal_helper.rb', line 2 def journal_post_category_links(post) html = "" if post.categories.any? html << "<span class='journal-post-header-categories'>" html << post.categories.collect do |c| link_to(c.title, show_journal_category_path(c.slug)) end.join(" ") html << "</span>" end html.html_safe end |
#journal_post_time(post) ⇒ Object
14 15 16 17 18 19 20 21 |
# File 'app/helpers/journal_helper.rb', line 14 def journal_post_time(post) time = post.published_at.strftime("%m.%d.%Y") html = """<time datetime='#{post.published_at}' class='journal-post-header-time'> #{time} </time>""" html.html_safe end |