Module: Omnom::PostsHelper

Defined in:
app/helpers/omnom/posts_helper.rb

Instance Method Summary collapse

Instance Method Details

#post_source_icon(post) ⇒ Object



7
8
9
10
# File 'app/helpers/omnom/posts_helper.rb', line 7

def post_source_icon(post)
  return nil if post.source.blank? || post.source.settings[:icon].blank?
   :div, image_tag(post.source.settings[:icon]), class: 'post-source-icon'
end

#post_timeago(post) ⇒ Object



3
4
5
# File 'app/helpers/omnom/posts_helper.rb', line 3

def post_timeago(post)
   :abbr, post.published_at.utc, title: post.published_at.iso8601, class: 'timeago'
end