Class: PagesController

Inherits:
Forgeos::ApplicationController
  • Object
show all
Defined in:
app/controllers/pages_controller.rb

Instance Method Summary collapse

Instance Method Details

#indexObject



5
6
7
8
9
10
11
# File 'app/controllers/pages_controller.rb', line 5

def index
  if @page = Page.find_by_single_key('home')
    redirect_to(@page)
  else
    page_not_found
  end
end

#showObject



13
14
15
# File 'app/controllers/pages_controller.rb', line 13

def show
  return page_not_found unless @page
end