Colin Law wrote in post #1149914: > On 17 June 2014 13:34, Ronald Fischer <[email protected]> wrote: >> In my schema, Idiom has an integer column kind. Given a certain card, I >> (1) @card.idioms(:order => 'kind DESC') >> >> This doesn't seem to have any effect. > > What do you mean by not having any effect?
It means that they always come out in the same order (which, accidentally, is *ascending* according to the kind values, which is likely a consequence, that I create the Idiom objects with ascending kind values, and so the probability is high that - with my small development database - I just get them back in the order they were created. BTW, I looked at the result by running .inspect on the returned data, and from this I found that it's not sorted descendingly. > If you have a look in log/development.log you will see the query being > run and check that it looks ok. Oh, of course, I should have thought of this myself! I'll do that next time I'm on the development host! Ronald -- Posted via http://www.ruby-forum.com/. -- 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 [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/d6524f4222847441bb2c4a4b149829e4%40ruby-forum.com. For more options, visit https://groups.google.com/d/optout.

