Created
July 22, 2014 09:56
-
-
Save oivoodoo/a4ce1956dc66fae53f2c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
report_klass = Class.new do | |
include Mongoid::Report | |
report 'example' do | |
columns :field4 => ->(context, row, options) { row['field3'] } | |
column :field3, :field4 | |
attach_to 'pregenerated' do | |
group_by :field1 | |
end | |
attach_to Model do | |
group_by :field1, :field2 | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment