Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #5470 from sandeepravi/warning_fixes

fixed - warning: instance variable @controller not initialized
  • Loading branch information...
commit cb0585eabe770ca92d72a935b06c8cb408b5d7a2 2 parents ab9f1b6 + 5ae53d5
José Valim josevalim authored
Showing with 5 additions and 0 deletions.
  1. +5 −0 actionpack/lib/action_controller/caching/sweeping.rb
5 actionpack/lib/action_controller/caching/sweeping.rb
View
@@ -54,6 +54,11 @@ def cache_sweeper(*sweepers)
class Sweeper < ActiveRecord::Observer #:nodoc:
attr_accessor :controller
+ def initialize(*args)
+ super
+ @controller = nil
+ end
+
def before(controller)
self.controller = controller
callback(:before) if controller.perform_caching
Please sign in to comment.
Something went wrong with that request. Please try again.