Gem Mongoid: multiples order_by in embbeds_many not work?

10 views
Skip to first unread message

Rodrigo Mendonça

unread,
Aug 26, 2014, 11:15:47 AM8/26/14
to rub...@googlegroups.com, rubyonra...@googlegroups.com
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


--

Reply all
Reply to author
Forward
0 new messages