Class: Spina::PagesController

Inherits:
ApplicationController show all
Defined in:
app/controllers/spina/pages_controller.rb

Instance Method Summary collapse

Methods included from ApplicationHelper

#captcha, #current_account, #error_explanation!, #image_tag_with_at2x, #link_to_add_fields, #markdown

Instance Method Details

#homepageObject



6
7
8
# File 'app/controllers/spina/pages_controller.rb', line 6

def homepage
  render_with_template(page)
end

#showObject



10
11
12
13
14
15
16
17
18
# File 'app/controllers/spina/pages_controller.rb', line 10

def show
  if should_skip_to_first_child?
    redirect_to first_live_child.try(:materialized_path) and return
  elsif page.link_url.present?
    redirect_to page.link_url and return
  end

  render_with_template(page)
end