Browse Source

Use ActiveRecord style ordering

master
Adrian Short 11 years ago
parent
commit
5355646760
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      app/controllers/feeds_controller.rb

+ 2
- 2
app/controllers/feeds_controller.rb View File

@@ -17,8 +17,8 @@ class FeedsController < ApplicationController
# GET /feeds/1.json
def show
@feed = Feed.find(params[:id])
@posts = @feed.posts.sort(:published.desc).paginate(:page => params[:page], :per_page => 20)
@posts = @feed.posts.order("published desc").paginate(:page => params[:page], :per_page => 20)
respond_to do |format|
format.html # show.html.erb
format.json { render json: @feed }


Loading…
Cancel
Save