aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/request_controller.rb
diff options
context:
space:
mode:
authorDavid Cabo <david@calibea.com>2011-07-26 02:39:57 +0200
committerDavid Cabo <david@calibea.com>2011-07-26 02:39:57 +0200
commit058a65ae0d079729b10a2954c472c336dce43245 (patch)
tree91543599b6db6538ceb2cdb36aaa9057ffe066fc /app/controllers/request_controller.rb
parent1ac1e5df9e1b8e670fbab1d2c65de6ce28232602 (diff)
parent04927e448f99f67bbfde88dd466f03fb23373b28 (diff)
Merge branch 'master' of github.com:sebbacon/alaveteli into asktheeu
Diffstat (limited to 'app/controllers/request_controller.rb')
-rw-r--r--app/controllers/request_controller.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/controllers/request_controller.rb b/app/controllers/request_controller.rb
index 81dffaa80..472f18f6e 100644
--- a/app/controllers/request_controller.rb
+++ b/app/controllers/request_controller.rb
@@ -19,10 +19,11 @@ class RequestController < ApplicationController
include RequestControllerCustomStates
@@custom_states_loaded = true
end
- rescue MissingSourceFile
+ rescue MissingSourceFile, NameError
end
def show
+ medium_cache
@locale = self.locale_from_params()
PublicBody.with_locale(@locale) do
@@ -95,6 +96,7 @@ class RequestController < ApplicationController
# Extra info about a request, such as event history
def details
+ long_cache
@info_request = InfoRequest.find_by_url_title(params[:url_title])
if !@info_request.user_can_view?(authenticated_user)
render :template => 'request/hidden', :status => 410 # gone
@@ -106,6 +108,7 @@ class RequestController < ApplicationController
# Requests similar to this one
def similar
+ short_cache
@per_page = 25
@page = (params[:page] || "1").to_i
@info_request = InfoRequest.find_by_url_title(params[:url_title])
@@ -124,6 +127,7 @@ class RequestController < ApplicationController
end
def list
+ medium_cache
@view = params[:view]
if @view.nil?