change group_by class loading - grouping of field now happens later

pull/6827/head
Philipp Tessenow 14 years ago
parent 91fa7783df
commit 99d4cb560c
  1. 6
      lib/report/group_by/base.rb

@ -4,11 +4,6 @@ class Report::GroupBy
inherited_attributes :group_fields, :list => true, :merge => false inherited_attributes :group_fields, :list => true, :merge => false
def self.inherited(klass)
klass.group_fields klass.field
super
end
def correct_position? def correct_position?
type == :row or !child.is_a?(engine::GroupBy::Base) or child.type == :column type == :row or !child.is_a?(engine::GroupBy::Base) or child.type == :column
end end
@ -71,6 +66,7 @@ class Report::GroupBy
def initialize(child = nil, optios = {}) def initialize(child = nil, optios = {})
super super
extend aggregation_mixin extend aggregation_mixin
group_fields field
end end
def result def result

Loading…
Cancel
Save