mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-23 02:30:12 +01:00
Deleting actions was broken. Should be fixed now.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@317 a4c988fc-2ded-0310-b66e-134b36920a42
This commit is contained in:
parent
dc73835c7b
commit
3e22381187
2 changed files with 5 additions and 6 deletions
|
|
@ -172,8 +172,8 @@ class TodoController < ApplicationController
|
||||||
|
|
||||||
def destroy
|
def destroy
|
||||||
@item = check_user_return_item
|
@item = check_user_return_item
|
||||||
context_id = @item.context_id
|
@context_id = @item.context_id
|
||||||
project_id = @item.project_id
|
@project_id = @item.project_id
|
||||||
@saved = @item.destroy
|
@saved = @item.destroy
|
||||||
|
|
||||||
respond_to do |wants|
|
respond_to do |wants|
|
||||||
|
|
@ -192,7 +192,7 @@ class TodoController < ApplicationController
|
||||||
source_view do |from|
|
source_view do |from|
|
||||||
from.todo do
|
from.todo do
|
||||||
@remaining_undone_in_context = Todo.count(:conditions => ['user_id = ? and context_id = ? and type = ? and done = ?',
|
@remaining_undone_in_context = Todo.count(:conditions => ['user_id = ? and context_id = ? and type = ? and done = ?',
|
||||||
@user.id, context_id, "Immediate", false])
|
@user.id, @context_id, "Immediate", false])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
@ -275,11 +275,11 @@ class TodoController < ApplicationController
|
||||||
end
|
end
|
||||||
from.context do
|
from.context do
|
||||||
@down_count = Todo.count(:conditions => ['todos.user_id = ? and todos.type = ? and todos.done = ? and todos.context_id = ?',
|
@down_count = Todo.count(:conditions => ['todos.user_id = ? and todos.type = ? and todos.done = ? and todos.context_id = ?',
|
||||||
@user.id, "Immediate", false, context_id])
|
@user.id, "Immediate", false, @context_id])
|
||||||
end
|
end
|
||||||
from.project do
|
from.project do
|
||||||
@down_count = Todo.count(:conditions => ['todos.user_id = ? and todos.type = ? and todos.done = ? and todos.project_id = ?',
|
@down_count = Todo.count(:conditions => ['todos.user_id = ? and todos.type = ? and todos.done = ? and todos.project_id = ?',
|
||||||
@user.id, "Immediate", false, project_id]) unless project_id == nil
|
@user.id, "Immediate", false, @project_id]) unless @project_id == nil
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,6 @@ ActionController::Routing::Routes.draw do |map|
|
||||||
|
|
||||||
# ToDo Routes
|
# ToDo Routes
|
||||||
map.connect 'done', :controller => 'todo', :action => 'completed'
|
map.connect 'done', :controller => 'todo', :action => 'completed'
|
||||||
map.connect 'delete/todo/:id', :controller =>'todo', :action => 'destroy'
|
|
||||||
|
|
||||||
# Deferred (Tickler) Routes
|
# Deferred (Tickler) Routes
|
||||||
map.connect 'tickler', :controller => 'deferred', :action => 'index'
|
map.connect 'tickler', :controller => 'deferred', :action => 'index'
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue