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