Skip to content
This repository has been archived by the owner on Aug 12, 2022. It is now read-only.

provide example for has_many, order: title.asc #242

Open
westonplatter opened this issue Jan 20, 2014 · 0 comments
Open

provide example for has_many, order: title.asc #242

westonplatter opened this issue Jan 20, 2014 · 0 comments
Milestone

Comments

@westonplatter
Copy link

using:

  • mongoid 4.0.0.beta
  • rails 4.0.2

making a note and tagging myself (@westonplatter), so I remember to come back to this.

the docs don't current describe that the order key-value pair should have the sort order (either asc or desc) tacked onto the sort attribute. therefore, the docs should have an example like this:

class SomeModel 
  include Mongoid::Document
  has_many :other_models, order: :attribute.asc
end
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant