diff --git a/app/views/contexts/_text_context.rhtml b/app/views/contexts/_text_context.rhtml index 6a4a3a22..84e57a25 100644 --- a/app/views/contexts/_text_context.rhtml +++ b/app/views/contexts/_text_context.rhtml @@ -1,7 +1,7 @@ <% context = text_context -todos_in_context = todos.select { |t| t.context_id == context.id } +todos_in_context = not_done_todos.select { |t| t.context_id == context.id } if todos_in_context.length > 0 -%> <%= context.name.upcase %>: <%= render :partial => "todos/text_todo", :collection => todos_in_context -%> -<% end -%> \ No newline at end of file +<% end -%> diff --git a/app/views/todos/index.text.erb b/app/views/todos/index.text.erb index c8895d03..194cd44d 100644 --- a/app/views/todos/index.text.erb +++ b/app/views/todos/index.text.erb @@ -1 +1 @@ -<%= render :partial => "contexts/text_context", :collection => @contexts, :locals => { :todos => @todos } %> \ No newline at end of file +<%= render :partial => "contexts/text_context", :collection => @contexts, :locals => { :todos => @todos, :not_done_todos => @not_done_todos } %>