fixed bug with empty group form submitting

This commit is contained in:
George Vinogradov 2011-12-07 00:16:19 +04:00
parent 3a9addd8db
commit c6e5ace271
1 changed files with 2 additions and 2 deletions

View File

@ -45,12 +45,12 @@ class GroupsController < ApplicationController
current_user
end
if @group.save!
if @group.save
flash[:notice] = t('flash.group.saved')
redirect_to edit_group_path(@group)
else
flash[:error] = t('flash.group.save_error')
flash[:warning] = @project.errors[:base]
flash[:warning] = @group.errors[:base]
render :action => :new
end
end