mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-24 03:00:12 +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: Should possibly handle state changes also?
|
||||
def add_predecessor_list(predecessor_list)
|
||||
raise "Can't handle other types than string for now" unless predecessor_list.kind_of? String
|
||||
@predecessor_array = predecessor_list.split(',').map do |description|
|
||||
description.strip.squeeze(" ")
|
||||
if predecessor_list.kind_of? String
|
||||
@predecessor_array = predecessor_list.split(',').map do |description|
|
||||
description.strip.squeeze(" ")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue