implement ability to programatically reset the cached Set of filters

pull/6827/head
Tim Felgentreff 14 years ago
parent 50af3b1e64
commit 6c222357cd
  1. 4
      lib/report/filter.rb
  2. 4
      lib/report/group_by.rb

@ -9,6 +9,10 @@ class Report::Filter
@all ||= Set[]
end
def self.reset!
@all = nil
end
def self.all_grouped
all.group_by { |f| f.applies_for }.to_a.sort { |a,b| a.first.to_s <=> b.first.to_s }
end

@ -12,6 +12,10 @@ class Report::GroupBy
Set[engine::GroupBy::SingletonValue]
end
def self.reset!
@all = nil
end
def self.all_grouped
all.group_by { |f| f.applies_for }.to_a.sort { |a,b| a.first.to_s <=> b.first.to_s }
end

Loading…
Cancel
Save