From 0093dafd804c59ea1685cdab2a79b37d63c8dbf0 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Wed, 29 Aug 2012 15:36:11 -0500 Subject: [PATCH] Use class_attribute so we dont bleed --- actionpack/lib/action_controller/metal/conditional_get.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/actionpack/lib/action_controller/metal/conditional_get.rb b/actionpack/lib/action_controller/metal/conditional_get.rb index 1445b3e383..870938df8f 100644 --- a/actionpack/lib/action_controller/metal/conditional_get.rb +++ b/actionpack/lib/action_controller/metal/conditional_get.rb @@ -1,3 +1,5 @@ +require 'active_support/core_ext/class/attribute' + module ActionController module ConditionalGet extend ActiveSupport::Concern @@ -5,7 +7,10 @@ module ActionController include RackDelegation include Head - included { cattr_accessor(:etaggers) { Array.new } } + included do + class_attribute :etaggers + self.etaggers = [] + end module ClassMethods # Allows you to consider additional controller-wide information when generating an etag.