Fix task validation #16

This commit is contained in:
Julius 2012-11-12 20:14:06 +01:00
parent 95efe554fc
commit e561ddb064
2 changed files with 3 additions and 4 deletions

View file

@ -17,14 +17,13 @@ class TasksController < ApplicationController
def create
@task = Task.new(params[:task])
if @task.errors.empty?
@task.save
if @task.save
flash[:notice] = "Aufgabe wurde erstellt"
if @task.workgroup
redirect_to :action => "workgroup", :id => @task.workgroup
else
redirect_to :action => "index"
end
end
else
render :template => "tasks/new"
end