Sha256: 37f60e4c7a1d06cd6049a35ecb429e174317add74464cbaa125b1353dee04ff9
Contents?: true
Size: 653 Bytes
Versions: 2
Compression:
Stored size: 653 Bytes
Contents
module Enki module UrlHelper def post_path(post, options = {}) suffix = options[:anchor] ? "##{options[:anchor]}" : "" path = [Enki.config[:engine, :mount_at], post.published_at.strftime("/%Y/%m/%d/") + post.slug + suffix].join if options[:only_path] == false URI.join(Enki.config[:url], path) else path end end def post_comments_path(post, comment) post_path(post) + "/comments" end def author_link(comment) if comment.author_url.blank? comment.author else link_to(comment.author, comment.author_url, :class => 'openid') end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
enki-engine-0.0.5 | app/helpers/enki/url_helper.rb |
enki-engine-0.0.4 | app/helpers/enki/url_helper.rb |