From 02305124e0fc5c4f82027c1e58db7b282fc12f9f Mon Sep 17 00:00:00 2001 From: Vokhmin Alexey V Date: Fri, 27 Jun 2014 01:26:26 +0400 Subject: [PATCH] #405: cleanup --- app/controllers/platforms/repositories_controller.rb | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/app/controllers/platforms/repositories_controller.rb b/app/controllers/platforms/repositories_controller.rb index e4fef513b..c2051a27a 100644 --- a/app/controllers/platforms/repositories_controller.rb +++ b/app/controllers/platforms/repositories_controller.rb @@ -116,9 +116,6 @@ class Platforms::RepositoriesController < Platforms::BaseController FROM groups ) AS owner ON projects.owner_id = owner.id AND projects.owner_type = owner.type" - colName = ['projects.name'] - sort_col = params[:iSortCol_0] || 0 - order = "#{colName[sort_col.to_i]} #{sort_dir}" if params[:added] == "true" @projects = @repository.projects @@ -130,7 +127,7 @@ class Platforms::RepositoriesController < Platforms::BaseController @total_projects = @projects.count @projects = @projects.by_owner(params[:owner_name]). - search(params[:sSearch]).order(order) + search(params[:sSearch]).order("projects.name #{sort_dir}") respond_to do |format| format.json {