From 154341c7364a7e40604e97ccca821f29c7374cbd Mon Sep 17 00:00:00 2001 From: Adrian Short Date: Wed, 15 Aug 2012 17:01:58 +0100 Subject: [PATCH] Sort posts by published date, most recent first --- app/controllers/feeds_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/feeds_controller.rb b/app/controllers/feeds_controller.rb index 0285077..77573f6 100644 --- a/app/controllers/feeds_controller.rb +++ b/app/controllers/feeds_controller.rb @@ -17,7 +17,7 @@ class FeedsController < ApplicationController # GET /feeds/1.json def show @feed = Feed.find(params[:id]) - @posts = @feed.posts.paginate(:page => params[:page], :per_page => 20) + @posts = @feed.posts.sort(:published.desc).paginate(:page => params[:page], :per_page => 20) respond_to do |format| format.html # show.html.erb