lib/ace.rb in ace-0.3.2 vs lib/ace.rb in ace-0.3.3
- old
+ new
@@ -49,11 +49,17 @@
# This class represents the items which will be
# eventually rendered like concrete posts, tags etc.
class Item
def self.inherited(subclass)
self.subclasses << subclass
- subclass.before_filters.push(*self.before_filters)
- subclass.after_filters.push(*self.after_filters)
+
+ self.before_filters.each do |instance|
+ subclass.before_filters << instance.dup
+ end
+
+ self.after_filters.each do |instance|
+ subclass.after_filters << instance.dup
+ end
end
def self.subclasses
@subclasses ||= [self]
end