46
47
48
49
50
51
52
53
54
|
# File 'app/helpers/effective_posts_helper.rb', line 46
def post_meta(post, date: true, datetime: false, category: true, author: true)
[
'Published',
("on #{post.published_at.strftime('%B %d, %Y')}" if date),
("on #{post.published_at.strftime('%B %d, %Y at %l:%M %p')}" if datetime),
("to #{link_to_post_category(post.category)}" if category && Array(EffectivePosts.categories).length > 1),
("by #{post.user.to_s.presence || 'Unknown'}" if author && EffectivePosts.post_meta_author && post.user.present?)
].compact.join(' ').html_safe
end
|