remove unnecessary count query for post_versions listing

This commit is contained in:
albert
2013-02-20 14:18:33 -05:00
parent 74aeb01418
commit 63394ef161
6 changed files with 90 additions and 3 deletions

View File

@@ -2,8 +2,7 @@ class PostVersionsController < ApplicationController
respond_to :html, :xml, :json
def index
@search = PostVersion.search(params[:search])
@post_versions = @search.order("updated_at desc").paginate(params[:page], :count => 1_000_000)
@post_versions = PostVersion.search(params[:search]).order("updated_at desc").paginate(params[:page], :count => 1_000_000)
respond_with(@post_versions)
end