mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-07 16:24:21 +01:00
#923: Fix for crash when adding todo from mobile view.
This commit is contained in:
parent
1f45497a52
commit
dc08cbe76f
1 changed files with 4 additions and 3 deletions
|
|
@ -221,9 +221,10 @@ class Todo < ActiveRecord::Base
|
||||||
# TODO: Handle todos with the same description
|
# TODO: Handle todos with the same description
|
||||||
# TODO: Should possibly handle state changes also?
|
# TODO: Should possibly handle state changes also?
|
||||||
def add_predecessor_list(predecessor_list)
|
def add_predecessor_list(predecessor_list)
|
||||||
raise "Can't handle other types than string for now" unless predecessor_list.kind_of? String
|
if predecessor_list.kind_of? String
|
||||||
@predecessor_array = predecessor_list.split(',').map do |description|
|
@predecessor_array = predecessor_list.split(',').map do |description|
|
||||||
description.strip.squeeze(" ")
|
description.strip.squeeze(" ")
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue