Module: Enki::UrlHelper
- Included in:
- ApplicationController
- Defined in:
- app/helpers/enki/url_helper.rb
Instance Method Summary collapse
- #author_link(comment) ⇒ Object
- #post_comments_path(post, comment) ⇒ Object
- #post_path(post, options = {}) ⇒ Object
Instance Method Details
#author_link(comment) ⇒ Object
17 18 19 20 21 22 23 |
# File 'app/helpers/enki/url_helper.rb', line 17 def (comment) if comment..blank? comment. else link_to(comment., comment., :class => 'openid') end end |
#post_comments_path(post, comment) ⇒ Object
13 14 15 |
# File 'app/helpers/enki/url_helper.rb', line 13 def post_comments_path(post, comment) post_path(post) + "/comments" end |
#post_path(post, options = {}) ⇒ Object
3 4 5 6 7 8 9 10 11 |
# File 'app/helpers/enki/url_helper.rb', line 3 def post_path(post, = {}) suffix = [:anchor] ? "##{[:anchor]}" : "" path = [Enki.config[:engine, :mount_at], post.published_at.strftime("/%Y/%m/%d/") + post.slug + suffix].join if [:only_path] == false URI.join(Enki.config[:url], path) else path end end |