Class: Spina::PagesController
Instance Method Summary
collapse
#captcha, #current_account, #error_explanation!, #image_tag_with_at2x, #link_to_add_fields, #markdown
Instance Method Details
#homepage ⇒ Object
5
6
7
|
# File 'app/controllers/spina/pages_controller.rb', line 5
def homepage
render_with_template(page)
end
|
#show ⇒ Object
9
10
11
12
13
14
15
16
17
18
19
20
21
|
# File 'app/controllers/spina/pages_controller.rb', line 9
def show
if should_skip_to_first_child?
if page.is_root?
redirect_to spina.subpage_path(page, first_live_child) and return
else
redirect_to spina.third_level_page_path(page.parent, page, first_live_child) and return
end
elsif page.link_url.present?
redirect_to page.link_url and return
end
render_with_template(page)
end
|