mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-10 01:24:19 +01:00
fix editing a todo from tag view
saving worked, but the edit form did not disappear and the updated todo did not show up in the right place
This commit is contained in:
parent
49aac48616
commit
186fd5694d
3 changed files with 19 additions and 9 deletions
|
|
@ -36,9 +36,12 @@ module Tracks
|
|||
def with_not_done_scope(opts={})
|
||||
conditions = ["todos.state = ?", 'active']
|
||||
if opts.has_key?(:include_project_hidden_todos) && (opts[:include_project_hidden_todos] == true)
|
||||
conditions = ["(todos.state = ? or todos.state = ?)", 'active', 'project_hidden']
|
||||
conditions = ["(todos.state = ? OR todos.state = ?)", 'active', 'project_hidden']
|
||||
end
|
||||
self.todos.send :with_scope, :find => {:conditions => conditions} do
|
||||
if opts.has_key?(:tag)
|
||||
conditions = ["todos.state = ? AND taggings.tag_id = ?", 'active', opts[:tag]]
|
||||
end
|
||||
self.todos.send :with_scope, :find => {:conditions => conditions, :include => [:taggings]} do
|
||||
yield
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue