Module: PagesHelper

Defined in:
app/helpers/pages_helper.rb

Instance Method Summary collapse

Instance Method Details

#page_title_tag(page) ⇒ Object


2
3
4
5
# File 'app/helpers/pages_helper.rb', line 2

def page_title_tag(page)
  return '' if page.blank?
  link_to(page.title, page_path(page.slug), class: 'page')
end

#render_edit_page_button(page) ⇒ Object


15
16
17
# File 'app/helpers/pages_helper.rb', line 15

def render_edit_page_button(page)
  link_to(icon_tag('pencil'), edit_page_path(page))
end

#render_page_updated_at(page) ⇒ Object


11
12
13
# File 'app/helpers/pages_helper.rb', line 11

def render_page_updated_at(page)
  timeago(page.updated_at)
end

#render_page_version(page) ⇒ Object


7
8
9
# File 'app/helpers/pages_helper.rb', line 7

def render_page_version(page)
  page.version
end