From f0caf6a9f9043237c56f5a6632131686ca4f138e Mon Sep 17 00:00:00 2001 From: Vokhmin Alexey V Date: Tue, 16 Oct 2012 20:38:49 +0400 Subject: [PATCH] #692: updated groups/profile_controller --- app/controllers/groups/profile_controller.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/controllers/groups/profile_controller.rb b/app/controllers/groups/profile_controller.rb index 3e7795680..9124a458f 100644 --- a/app/controllers/groups/profile_controller.rb +++ b/app/controllers/groups/profile_controller.rb @@ -22,8 +22,7 @@ class Groups::ProfileController < Groups::BaseController end def create - @group = Group.new params[:group] - @group.owner = current_user + @group = current_user.own_groups.new params[:group] if @group.save flash[:notice] = t('flash.group.saved') redirect_to group_path(@group)