From 1db324d1a29a37e5a077f4c0c28c256ca34dc207 Mon Sep 17 00:00:00 2001 From: chris Date: Fri, 19 Jul 2013 17:38:43 +0800 Subject: [PATCH] Fix get_sorted_and_filtered --- app/controllers/application_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 053a2ec6a..bdb9059e3 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -230,6 +230,7 @@ class ApplicationController < ActionController::Base end def get_sorted_and_filtered(object_class, query = nil, objects = nil) + object_class = object_class.classify.constantize if params[:filter] || params[:sort] || params[:new_filter] @filter = params[:filter] new_filter = params[:new_filter] @@ -248,7 +249,6 @@ class ApplicationController < ActionController::Base @filter = {new_filter[:type] => [new_filter[:id].to_s]} end - object_class = object_class.classify.constantize objects ||= get_objects(object_class, query) unless params[:sort].blank? options = params[:sort_options]