fix pool version ordering
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
class PoolVersionsController < ApplicationController
|
class PoolVersionsController < ApplicationController
|
||||||
def index
|
def index
|
||||||
@search = PoolVersion.search(params[:search])
|
@search = PoolVersion.search(params[:search])
|
||||||
@pool_versions = @search.order("id desc").paginate(params[:page])
|
@pool_versions = @search.order("updated_at desc").paginate(params[:page])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -0,0 +1,11 @@
|
|||||||
|
class AddIndexUpdatedAtOnPoolVersions < ActiveRecord::Migration
|
||||||
|
def up
|
||||||
|
execute "set statement_timeout = 0"
|
||||||
|
add_index :post_versions, :updated_at
|
||||||
|
end
|
||||||
|
|
||||||
|
def down
|
||||||
|
execute "set statement_timeout = 0"
|
||||||
|
remove_index :post_versions, :updated_at
|
||||||
|
end
|
||||||
|
end
|
||||||
Reference in New Issue
Block a user