Skip to content
This repository has been archived by the owner on Jun 17, 2020. It is now read-only.

Commit

Permalink
Revert "Added cache and sweepers"
Browse files Browse the repository at this point in the history
This reverts commit af45376.
  • Loading branch information
paradox460 committed Apr 18, 2013
1 parent b6abf68 commit bdc79f9
Show file tree
Hide file tree
Showing 10 changed files with 5 additions and 68 deletions.
3 changes: 0 additions & 3 deletions app/controllers/pages_controller.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
class PagesController < ApplicationController
caches_page :show
cache_sweeper :pages_sweeper
before_filter(only: :show) { @page_caching = true }
def show
@page = Page.find_by_permalink!(params[:id])

Expand Down
3 changes: 0 additions & 3 deletions app/controllers/sponsors_controller.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
class SponsorsController < ApplicationController
caches_page :index
cache_sweeper :sponsors_sweeper
before_filter(only: :index) { @page_caching = true}
# GET /sponsors
# GET /sponsors.json
def index
Expand Down
3 changes: 0 additions & 3 deletions app/controllers/staff_controller.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
class StaffController < ApplicationController
caches_page :index
cache_sweeper :staff_sweeper
before_filter(only: :index) { @page_caching = true}
# GET /staff
# GET /staff.json
def index
Expand Down
3 changes: 0 additions & 3 deletions app/controllers/updates_controller.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
class UpdatesController < ApplicationController
caches_page :index, :show
cache_sweeper :updates_sweeper
before_filter(only: [:index, :show]) { @page_caching = true }
# GET /updates
# GET /updates.json
def index
Expand Down
12 changes: 0 additions & 12 deletions app/sweepers/pages_sweeper.rb

This file was deleted.

12 changes: 0 additions & 12 deletions app/sweepers/sponsors_sweeper.rb

This file was deleted.

12 changes: 0 additions & 12 deletions app/sweepers/staff_sweeper.rb

This file was deleted.

13 changes: 0 additions & 13 deletions app/sweepers/updates_sweeper.rb

This file was deleted.

11 changes: 5 additions & 6 deletions app/views/layouts/application.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,15 @@
= stylesheet_link_tag 'application-screen', media: 'screen'
= javascript_include_tag 'application'
= google_webfonts_link_tag roboto: [100, 400, 500, 700, "italic", "bolditalic"]
= csrf_meta_tags unless @page_caching
= csrf_meta_tags
%body
%header#header
= render 'layouts/partials/header'
#content
- unless @page_caching
- if flash[:notice]
%p.notice= flash[:notice]
- if flash[:error]
%p.error= flash[:error]
- if flash[:notice]
%p.notice= flash[:notice]
- if flash[:error]
%p.error= flash[:error]
%aside#sidebar
= render 'layouts/partials/sidebar'
#spin-container
Expand Down
1 change: 0 additions & 1 deletion config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
root to: 'updates#index'

get ':id',to:'pages#show', as: :page
resources :pages

# The priority is based upon order of creation:
# first created -> highest priority.
Expand Down

0 comments on commit bdc79f9

Please sign in to comment.