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 -- -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscr...@googlegroups.com. To post to this group, send email to rubyonrails-talk@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAC_Rs1WK90BT70W43EDSk2v5C4No71UVURKHu%2BWYCuSmsP1ttg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.