mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-05 23:41:48 +01:00
all unit and functional tests are passing
This commit is contained in:
parent
96db48dd86
commit
13b58f3a10
40 changed files with 1107 additions and 1494 deletions
|
|
@ -372,9 +372,9 @@ class Todo < ActiveRecord::Base
|
|||
|
||||
context_id = default_context_id
|
||||
unless(context.nil?)
|
||||
found_context = user.contexts.active.find_by_namepart(context)
|
||||
found_context = user.contexts.find_by_namepart(context) if found_context.nil?
|
||||
context_id = found_context.id unless found_context.nil?
|
||||
found_context = user.contexts.active.where("name like ?", "%#{context}%").first
|
||||
found_context = user.contexts.where("name like ?", "%#{context}%").first if !found_context
|
||||
context_id = found_context.id if found_context
|
||||
end
|
||||
|
||||
unless user.contexts.exists? context_id
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue