Module: BlogHelper

Defined in:
app/helpers/blog_helper.rb

Overview

View helper: blog.

Instance Method Summary collapse

Instance Method Details

#post_title(post) ⇒ Object



4
5
6
# File 'app/helpers/blog_helper.rb', line 4

def post_title(post)
  link_to post.title[0..65], post_path(post)
end


8
9
10
11
12
# File 'app/helpers/blog_helper.rb', line 8

def tags_with_links(post)
  post.tags.select { |t| t.in?(Post::POST_TAGS) }.map do |t|
    link_to Post.tag_title(t), cms_link("/posts/#{t}/tag")
  end.join(', ').html_safe
end