[#125] fix checking ability to create project for group

This commit is contained in:
Alexander Machehin 2013-05-08 20:41:15 +06:00
parent 90ed22a347
commit 8c7a4937c0
1 changed files with 1 additions and 1 deletions

View File

@ -34,7 +34,7 @@ class Projects::ProjectsController < Projects::BaseController
@project = Project.new params[:project]
@project.owner = choose_owner
@who_owns = (@project.owner_type == 'User' ? :me : :group)
authorize! :write, @project if @project.owner.class == Group
authorize! :write, @project.owner if @project.owner.class == Group
if @project.save
flash[:notice] = t('flash.project.saved')