Removed hardcoded links from main tabnav.

* Reorganized routes and foodsoft config
* Avoid saving of wrong foodcoop tokens when following hard coded link
This commit is contained in:
Benjamin Meichsner 2010-03-20 13:45:58 +01:00
parent 9cb367463c
commit 2c1952d625
8 changed files with 81 additions and 113 deletions

View file

@ -6,7 +6,7 @@ class TasksController < ApplicationController
@groups = Workgroup.all
end
def myTasks
def user
@unaccepted_tasks = @current_user.unaccepted_tasks
@accepted_tasks = @current_user.accepted_tasks
end
@ -78,7 +78,7 @@ class TasksController < ApplicationController
task.assignments.create(:user => current_user, :accepted => true)
end
flash[:notice] = "Du hast die Aufgabe übernommen"
redirect_to my_tasks_path
redirect_to user_tasks_path
end
# deletes assignment between current_user and given task