Fix get_sorted_and_filtered

This commit is contained in:
chris 2013-07-19 17:38:43 +08:00
parent fc09ac3b68
commit 1db324d1a2
1 changed files with 1 additions and 1 deletions

View File

@ -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]