mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-18 00:00:12 +01:00
Committing Ben's patch for #868.
Fixes #868. I wish I could write a spec for it, but RSpec isn't behaving well with partials.
This commit is contained in:
parent
66de0f9fd8
commit
f25ee06c49
2 changed files with 8 additions and 2 deletions
|
|
@ -422,6 +422,12 @@ class TodosController < ApplicationController
|
|||
@projects = current_user.projects
|
||||
@contexts = current_user.contexts
|
||||
@contexts_to_show = @contexts.reject {|x| x.hide? }
|
||||
|
||||
# Set defaults for new_action
|
||||
@initial_tag_name = @tag_name
|
||||
unless @not_done_todos.empty?
|
||||
@context = current_user.contexts.find_by_id(@not_done_todos[0].context_id)
|
||||
end
|
||||
|
||||
# Set count badge to number of items with this tag
|
||||
@not_done_todos.empty? ? @count = 0 : @count = @not_done_todos.size
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue