kick out Abbrev to make sure we get consistent query cache_keys

pull/6827/head
jwollert 14 years ago
parent 070e7ed4b4
commit a345a9b038
  1. 7
      lib/report/filter/base.rb
  2. 7
      lib/report/group_by/base.rb

@ -1,5 +1,3 @@
require 'abbrev'
class Report::Filter
class Base < Report::Chainable
include Report::QueryUtils
@ -19,10 +17,7 @@ class Report::Filter
attr_accessor :values
def self.cache_key
@cache_key ||= begin
abbrev = Abbrev.abbrev(engine::Filter.all.map(&:underscore_name))
abbrev.keys.detect { |key| abbrev[key] == underscore_name }.to_s
end
@cache_key ||= underscore_name
end
def cache_key

@ -1,5 +1,3 @@
require 'abbrev'
class Report::GroupBy
class Base < Report::Chainable
include Report::QueryUtils
@ -19,10 +17,7 @@ class Report::GroupBy
end
def self.cache_key
@cache_key ||= begin
abbrev = Abbrev.abbrev(engine::GroupBy.all.map(&:underscore_name))
abbrev.keys.detect { |key| abbrev[key] == underscore_name }.to_s
end
@cache_key ||= underscore_name
end
def cache_key

Loading…
Cancel
Save