Pārlūkot izejas kodu

Sort posts by published date, most recent first

master
Adrian Short pirms 12 gadiem
vecāks
revīzija
154341c736
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. +1
    -1
      app/controllers/feeds_controller.rb

+ 1
- 1
app/controllers/feeds_controller.rb Parādīt failu

@@ -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


Notiek ielāde…
Atcelt
Saglabāt