mirror of
https://github.com/TracksApp/tracks.git
synced 2026-01-02 07:18:49 +01:00
Remove context_specified_by_name from TodosController
Use TodoCreateParamsHelper instead to remove the duplication
This commit is contained in:
parent
d5dc723ef0
commit
56f366b432
1 changed files with 1 additions and 7 deletions
|
|
@ -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) +
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue