Class: Comfy::Blog::Post

Inherits:
ActiveRecord::Base
  • Object
show all
Includes:
Cms::WithCategories, Cms::WithFragments
Defined in:
app/models/comfy/blog/post.rb

Instance Method Summary collapse

Instance Method Details

#url(relative: false) ⇒ Object

– Instance Mathods ——————————————————–



34
35
36
37
38
# File 'app/models/comfy/blog/post.rb', line 34

def url(relative: false)
  public_blog_path = ComfyBlog.config.public_blog_path
  post_path = ["/", public_blog_path, year, month, slug].join("/").squeeze("/")
  [site.url(relative: relative), post_path].join
end