mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-18 00:00:12 +01:00
extract method
This commit is contained in:
parent
7aacc1a919
commit
e12981c827
1 changed files with 61 additions and 57 deletions
|
|
@ -95,6 +95,11 @@ class TodosController < ApplicationController
|
||||||
if is_multiple
|
if is_multiple
|
||||||
create_multiple
|
create_multiple
|
||||||
else
|
else
|
||||||
|
create_single
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def create_single
|
||||||
p = Todos::TodoCreateParamsHelper.new(params, current_user)
|
p = Todos::TodoCreateParamsHelper.new(params, current_user)
|
||||||
p.parse_dates unless mobile?
|
p.parse_dates unless mobile?
|
||||||
tag_list = p.tag_list
|
tag_list = p.tag_list
|
||||||
|
|
@ -160,7 +165,6 @@ class TodosController < ApplicationController
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
|
||||||
|
|
||||||
def create_multiple
|
def create_multiple
|
||||||
p = Todos::TodoCreateParamsHelper.new(params, current_user)
|
p = Todos::TodoCreateParamsHelper.new(params, current_user)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue