lib/mongoid/report/queries_builder.rb in mongoid-report-0.1.6 vs lib/mongoid/report/queries_builder.rb in mongoid-report-0.1.7
- old
+ new
@@ -15,10 +15,12 @@
def groups
@group_by ||= settings.fetch(:group_by, [])
end
def fields
- @fields ||= settings[:fields]
+ @fields ||= settings[:fields].select do |field, _|
+ !settings[:columns].include?(field.to_sym)
+ end
end
def in_fields
@in_fields ||= fields.keys
end