Skip to content

Commit

Permalink
fixed - warning: instance variable @controller not initialized
Browse files Browse the repository at this point in the history
  • Loading branch information
sandeepr-sourcebits committed Mar 16, 2012
1 parent 5245eb3 commit 5ae53d5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions actionpack/lib/action_controller/caching/sweeping.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5ae53d5

Please sign in to comment.