Closed dkrusenstrahle closed 11 years ago
You might want to use Model#all https://github.com/siuying/NanoStoreInMotion/blob/master/spec/finder_spec.rb#L187
Yes thanks but like I said in the question I tried this and no sorting is done:
Project.all({:sort => {:created_at => :desc}})
That should work as the test do pass. If it does not work for you, can you create a simple test case that show the issue?
Close due to lack of response. If you believe there is indeed problem in the code base, please supply more info. Thanks!
Hello,
How can I sort a query without params? This does not work (sorting is not working):
Project.all({:sort => {:created_at => :desc}})
Nor this:
Project.find({:sort => {:created_at => :desc}})
This works however I have no param to include. I just want to get all records and sort them:
Project.find({:project => @project },{:sort => {:created_at => :desc}})