almost 5 years ago
Today we are going to discuss about reorder in rails. This method is used to override the scope of order and reorder the rows according to the passed arguments.
Blog.order('title DESC').reorder('published_at') # generated SQL has 'ORDER BY published_at'
To reverse the existing order, reverse_order is used.
Blog.order('published_at ASC').reverse_order # generated SQL has 'ORDER BY published_at DESC'
Hope you liked it too, For more like this. Click here
Starting with Chrome version 45, NPAPI is no longer supported for Google Chrome. For more information, see Chrome and NPAPI (blog.chromium.org).
Firefox and Microsoft Internet Explorer are recommended browsers for websites using java applets.
Chrome Version Support
Are you sure, you want to delete this comment?
© copyright 2017 FindNerd.com. All rights reserved.
Sign up using