dimanche 16 octobre 2016

Rails bug in Active Record Model

I was practicing my Code and soon I found that '.order' method works in reverse. My rails version is '5.0.0.1'

I used it like:

(i) User.order(salary: :desc).first(3)

(ii) User.order(salary: :desc).first(3)

I got reverse results. I am using mysql database. Can anybody tell me whether its mine mistake or really it's rails problem.

Aucun commentaire:

Enregistrer un commentaire