Commit 4240613529d298a0b4fc6b6d98a472ab6f2e5a88

Authored by Leandro Santos
1 parent a0b75618

pass the correct search task parameters

app/controllers/my_profile/tasks_controller.rb
@@ -90,9 +90,9 @@ class TasksController < MyProfileController @@ -90,9 +90,9 @@ class TasksController < MyProfileController
90 end 90 end
91 91
92 def search_tasks 92 def search_tasks
93 -  
94 - params[:filter_type] = params[:filter_type].blank? ? nil : params[:filter_type]  
95 - result = Task.pending_all(profile,params) 93 + filter_type = params[:filter_type].presence
  94 + filter_text = params[:filter_text].presence
  95 + result = Task.pending_all(profile,filter_type, filter_text)
96 96
97 render :json => result.map { |task| {:label => task.data[:name], :value => task.data[:name]} } 97 render :json => result.map { |task| {:label => task.data[:name], :value => task.data[:name]} }
98 end 98 end