fix for post version pagination

This commit is contained in:
albert
2013-02-21 13:37:56 -05:00
parent 0ca97d4c00
commit b8d93c301a

View File

@@ -2,7 +2,7 @@ class PostVersionsController < ApplicationController
respond_to :html, :xml, :json
def index
@post_versions = PostVersion.search(params[: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 => (params[:search].present? ? nil : 1_000_000))
respond_with(@post_versions)
end