diff --git a/app/controllers/todos_controller.rb b/app/controllers/todos_controller.rb index 000b451c..50e41a7b 100644 --- a/app/controllers/todos_controller.rb +++ b/app/controllers/todos_controller.rb @@ -181,7 +181,7 @@ class TodosController < ApplicationController @project_id = project.id end - if context_specified_by_name(params[:context_name]) + if p.context_specified_by_name? context = current_user.contexts.where(:name => params[:context_name]).first_or_create @new_context_created = context.new_record_before_save? @not_done_todos = [] if @new_context_created @@ -1351,12 +1351,6 @@ class TodosController < ApplicationController end end - def context_specified_by_name(context_name) - return false unless params['context_id'].blank? - return false if context_name.blank? - true - end - def determine_non_uniq_todo # for calendar view. TODO: unused all_list_uniq_ids = (@due_today.map(&:id) + @due_this_week.map(&:id) +