Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

* activate and fix caching of sections

  • Loading branch information...
commit d9baabdb958b16bcd6efa2c34e3eb11cd88544f2 1 parent 0660979
Mathias Kutzner authored committed
Showing with 3 additions and 2 deletions.
  1. +3 −2 app/views/surveyor/edit.html.haml
5 app/views/surveyor/edit.html.haml
View
@@ -8,8 +8,9 @@
.survey_title= @survey.title
.previous_section= previous_section
= render 'partials/dependents' unless @dependents.empty?
- - if false #@response_set.no_responses_for_section?(@section) # cache if response_set has no responses for current section
- = cache("section_#{@section.id}"){ render "/partials/section", :f => f }
+ - if @response_set.no_responses_for_section?(@section) # cache if response_set has no responses for current section
+ - cache("section_#{@section.id}") do
+ = render "/partials/section", :f => f
- else # no cache
= render "/partials/section", :f => f
.next_section= next_section

4 comments on commit d9baabd

yoon

This breaks when:

config.action_controller.perform_caching = true

in the current environment file.

ewto

how does it break?
The no_responses_for_section? method was fixed by
c529676

yoon

When I am in production or turn on config.action_controller.perform_caching = true (Rails 2.3.10, REE 1.8.7, latest surveyor) the section doesn't render at all. When I reload, instead of the section rendering, the whole page renders where the section should be. So I see "Kitchen Sink Survey" twice.

ewto

the fix was submitted on the rails3 branch. are you sure you used this branch with Rails 2.3.10?

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