When we would like to sort the result-set in ascending or descending, we can use ORDER BY in SQL query. In Rails, we can use order which is derived from ActiveRecord::QueryMethods. For example, Article.all.order(published_at: :desc) Let's focus on t...
lynnbright.com3 min read
No responses yet.