Forum: Ruby on Rails Gem Mongoid: multiples order_by in embbeds_many not work?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
4995e71aff71f480d4f19c65c083a307?d=identicon&s=25 Rodrigo Mendonça (Guest)
on 2014-08-26 17:16
(Received via mailing list)
Example:
School embeds_many :students

In rails console:
School.first.students.order_by(:name.asc, :email.desc)

Works with name. but why ordering from second field (email) not work??
It's
a bug?

I opened an issue in mongoid gem, but maybe it's a mongodb problem
insted
https://github.com/mongoid/mongoid/issues/3782


--
This topic is locked and can not be replied to.