瀏覽代碼

Sort posts by published date, most recent first

master
Adrian Short 12 年之前
父節點
當前提交
154341c736
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. +1
    -1
      app/controllers/feeds_controller.rb

+ 1
- 1
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


Loading…
取消
儲存