From 4240613529d298a0b4fc6b6d98a472ab6f2e5a88 Mon Sep 17 00:00:00 2001 From: Leandro Nunes dos Santos Date: Tue, 14 Jul 2015 00:05:49 -0300 Subject: [PATCH] pass the correct search task parameters --- app/controllers/my_profile/tasks_controller.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/controllers/my_profile/tasks_controller.rb b/app/controllers/my_profile/tasks_controller.rb index 2b31589..c1e1451 100644 --- a/app/controllers/my_profile/tasks_controller.rb +++ b/app/controllers/my_profile/tasks_controller.rb @@ -90,9 +90,9 @@ class TasksController < MyProfileController end def search_tasks - - params[:filter_type] = params[:filter_type].blank? ? nil : params[:filter_type] - result = Task.pending_all(profile,params) + filter_type = params[:filter_type].presence + filter_text = params[:filter_text].presence + result = Task.pending_all(profile,filter_type, filter_text) render :json => result.map { |task| {:label => task.data[:name], :value => task.data[:name]} } end -- libgit2 0.21.2