Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Simple update to app.rb and the pages controller

  • Loading branch information...
commit 69a07a9de68fc63d6af03f4d2a462e3678de21ba 1 parent 6a92493
Adam Stacoviak authored

Showing 2 changed files with 4 additions and 6 deletions. Show diff stats Hide diff stats

  1. +3 4 app/app.rb
  2. +1 2  app/controllers/pages.rb
7 app/app.rb
@@ -30,9 +30,8 @@ class Presto < Padrino::Application
30 30 # end
31 31 #
32 32
33   - error 404 do
34   - render "themes/#{Nesta::Config.theme}/404", :layout => "themes/#{Nesta::Config.theme}/application".to_sym
35   - end
36   -
  33 + error 404 do
  34 + render "themes/#{Nesta::Config.theme}/404", :layout => "themes/#{Nesta::Config.theme}/application".to_sym
  35 + end
37 36
38 37 end
3  app/controllers/pages.rb
... ... @@ -1,5 +1,4 @@
1 1 Presto.controllers :pages do
2   -
3 2
4 3 before do
5 4 @menu_items = Page.menu_items
@@ -48,8 +47,8 @@
48 47 @title = @page.title
49 48 @description = @page.description
50 49 @keywords = @page.keywords
  50 + response.headers['Cache-Control'] = 'public, max-age=300'
51 51 render "themes/#{Nesta::Config.theme}/#{@page.template}", :layout => @page.layout
52 52 end
53 53
54   -
55 54 end

0 comments on commit 69a07a9

Please sign in to comment.
Something went wrong with that request. Please try again.