Module: BlogHelper

Defined in:
app/helpers/blog_helper.rb

Instance Method Summary collapse

Instance Method Details

#blog_archives_urlObject



2
3
4
5
6
7
8
# File 'app/helpers/blog_helper.rb', line 2

def blog_archives_url
  if preview?
    "/admin/blog/archives"
  else
    "/blog/archives"
  end
end

#blog_current_urlObject



10
11
12
13
14
15
16
# File 'app/helpers/blog_helper.rb', line 10

def blog_current_url
  if preview?
    "/admin/blog/preview"
  else
    "/blog"
  end
end

#blog_post_url(url_title) ⇒ Object



18
19
20
21
22
23
24
# File 'app/helpers/blog_helper.rb', line 18

def blog_post_url(url_title)
  if preview?
    "/admin/blog/#{url_title}/preview"
  else
    "/blog/#{url_title}"
  end
end