Class: PagesController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- PagesController
- Defined in:
- app/controllers/pages_controller.rb
Instance Method Summary collapse
-
#index ⇒ Object
caches_page :show, :if => :get_page.
- #show ⇒ Object
Instance Method Details
#index ⇒ Object
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 |
#show ⇒ Object
14 15 16 |
# File 'app/controllers/pages_controller.rb', line 14 def show return page_not_found unless @page end |