Skip to content

Instantly share code, notes, and snippets.

@jasoares
Created July 19, 2014 23:43
Show Gist options
  • Select an option

  • Save jasoares/ee4dc0f4b214315580a9 to your computer and use it in GitHub Desktop.

Select an option

Save jasoares/ee4dc0f4b214315580a9 to your computer and use it in GitHub Desktop.
Moped does not support options to aggregation framework, use the following command instead...
respond_with Mongoid.default_session.command(
aggregate: 'data_points',
pipeline: pipeline,
allowDiskUse: true
)['result'].map { |dp| User.new(dp['user']) }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment