Skip to content
This repository
Browse code

remove klass because it is not used

  • Loading branch information...
commit 2efe6ce538a89c1c143d40ae5455ff85d9e21a54 1 parent 40bdad3
Aaron Patterson authored May 10, 2013
16  activesupport/lib/active_support/callbacks.rb
@@ -94,16 +94,15 @@ module Filters
94 94
     end
95 95
 
96 96
     class Callback #:nodoc:#
97  
-      def self.build(chain, filter, kind, options, _klass)
98  
-        new chain, filter, kind, options, _klass
  97
+      def self.build(chain, filter, kind, options)
  98
+        new chain, filter, kind, options
99 99
       end
100 100
 
101  
-      attr_accessor :chain, :kind, :options, :klass
  101
+      attr_accessor :chain, :kind, :options
102 102
 
103  
-      def initialize(chain, filter, kind, options, klass)
  103
+      def initialize(chain, filter, kind, options)
104 104
         @chain   = chain
105 105
         @kind    = kind
106  
-        @klass   = klass
107 106
         @filter  = filter
108 107
         @options = options
109 108
         @key     = compute_identifier filter
@@ -121,10 +120,9 @@ def deprecate_per_key_option(options)
121 120
         end
122 121
       end
123 122
 
124  
-      def clone(chain, klass)
  123
+      def clone(chain)
125 124
         obj                  = super()
126 125
         obj.chain            = chain
127  
-        obj.klass            = klass
128 126
         obj.options          = @options.dup
129 127
         obj.options[:if]     = @options[:if].dup
130 128
         obj.options[:unless] = @options[:unless].dup
@@ -473,7 +471,7 @@ def set_callback(name, *filter_list, &block)
473 471
 
474 472
         __update_callbacks(name, filter_list, block) do |target, chain, type, filters, options|
475 473
           mapped ||= filters.map do |filter|
476  
-            Callback.build(chain, filter, type, options.dup, self)
  474
+            Callback.build(chain, filter, type, options.dup)
477 475
           end
478 476
 
479 477
           options[:prepend] ? chain.prepend(*mapped) : chain.append(*mapped)
@@ -495,7 +493,7 @@ def skip_callback(name, *filter_list, &block)
495 493
             filter = chain.find {|c| c.matches?(type, filter) }
496 494
 
497 495
             if filter && options.any?
498  
-              new_filter = filter.clone(chain, self)
  496
+              new_filter = filter.clone(chain)
499 497
               chain.insert(chain.index(filter), new_filter)
500 498
               new_filter.recompile!(options)
501 499
             end

0 notes on commit 2efe6ce

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