Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Simple update to app.rb and the pages controller

  • Loading branch information...
commit 69a07a9de68fc63d6af03f4d2a462e3678de21ba 1 parent 6a92493
Adam Stacoviak authored
Showing with 4 additions and 6 deletions.
  1. +3 −4 app/app.rb
  2. +1 −2  app/controllers/pages.rb
View
7 app/app.rb
@@ -30,9 +30,8 @@ class Presto < Padrino::Application
# end
#
- error 404 do
- render "themes/#{Nesta::Config.theme}/404", :layout => "themes/#{Nesta::Config.theme}/application".to_sym
- end
-
+ error 404 do
+ render "themes/#{Nesta::Config.theme}/404", :layout => "themes/#{Nesta::Config.theme}/application".to_sym
+ end
end
View
3  app/controllers/pages.rb
@@ -1,5 +1,4 @@
Presto.controllers :pages do
-
before do
@menu_items = Page.menu_items
@@ -48,8 +47,8 @@
@title = @page.title
@description = @page.description
@keywords = @page.keywords
+ response.headers['Cache-Control'] = 'public, max-age=300'
render "themes/#{Nesta::Config.theme}/#{@page.template}", :layout => @page.layout
end
-
end
Please sign in to comment.
Something went wrong with that request. Please try again.