diff --git a/app/controllers/shixuns_controller.rb b/app/controllers/shixuns_controller.rb index 42b54ab2a..1c8928d98 100644 --- a/app/controllers/shixuns_controller.rb +++ b/app/controllers/shixuns_controller.rb @@ -459,9 +459,9 @@ class ShixunsController < ApplicationController def get_data_sets page = params[:page] || 1 limit = params[:limit] || 10 - data_sets = @shixun.data_sets.order("created_on desc") + data_sets = @shixun.data_sets @data_count = data_sets.count - @data_sets= data_sets.page(page).per(limit) + @data_sets= data_sets.order("created_on desc").page(page).per(limit) @absolute_folder = edu_setting('shixun_folder') end