fixes #3659. deserialize used the wrong order of group_bys

git-svn-id: https://dev.finn.de/svn/cockpit/branches/deployment_merge@2107 7926756e-e54e-46e6-9721-ed318f58905e
pull/6827/head
j.wollert 14 years ago
parent b89124500a
commit 965acf07ef
  1. 3
      app/models/cost_query.rb

@ -19,7 +19,8 @@ class CostQuery < ActiveRecord::Base
def self.deserialize(hash) def self.deserialize(hash)
self.new.tap do |q| self.new.tap do |q|
hash[:filters].each {|name, opts| q.filter(name, opts) } hash[:filters].each {|name, opts| q.filter(name, opts) }
hash[:group_bys].each {|name, opts| q.group_by(name, opts) } # have to take the reverse to regain the original order
hash[:group_bys].reverse.each {|name, opts| q.group_by(name, opts) }
end end
end end

Loading…
Cancel
Save