diff --git a/app/models/cost_query/filter.rb b/app/models/cost_query/filter.rb index c3c6aef859..f26d55eedf 100644 --- a/app/models/cost_query/filter.rb +++ b/app/models/cost_query/filter.rb @@ -31,7 +31,7 @@ module CostQuery::Filter end def self.all_grouped - CostQuery::Filter.all.group_by { |f| f.applies_for }.to_a.sort { |a,b| a.first.to_s <=> b.first.to_s } + all.group_by { |f| f.applies_for }.to_a.sort { |a,b| a.first.to_s <=> b.first.to_s } end def self.from_hash diff --git a/app/models/cost_query/group_by.rb b/app/models/cost_query/group_by.rb index 42b36c96e3..672bf8aab5 100644 --- a/app/models/cost_query/group_by.rb +++ b/app/models/cost_query/group_by.rb @@ -23,7 +23,7 @@ module CostQuery::GroupBy end def self.all_grouped - all.group_by { |g| g.applies_for }.to_a.sort { |a,b| a.first.to_s <=> b.first.to_s } + all.group_by { |f| f.applies_for }.to_a.sort { |a,b| a.first.to_s <=> b.first.to_s } end def self.from_hash