Class: PagesController

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

Instance Method Summary collapse

Instance Method Details

#indexObject

caches_page :show, :if => :get_page



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

def index
  if @page = Page.find_by_single_key('home')
    #FIXME redirect_to(@page)
    redirect_to('/' + @page.url)
  else
    page_not_found
  end
end

#showObject



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

def show
  return page_not_found unless @page
end