diff options
Diffstat (limited to 'app/controllers/teams_controller.rb')
-rw-r--r-- | app/controllers/teams_controller.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/app/controllers/teams_controller.rb b/app/controllers/teams_controller.rb index ef66b77e232..4861892d36e 100644 --- a/app/controllers/teams_controller.rb +++ b/app/controllers/teams_controller.rb @@ -9,13 +9,11 @@ class TeamsController < ApplicationController layout 'user_team', except: [:new, :create] def show - user_team projects @events = Event.in_projects(user_team.project_ids).limit(20).offset(params[:offset] || 0) end def edit - user_team end def update @@ -41,6 +39,9 @@ class TeamsController < ApplicationController @team.path = @team.name.dup.parameterize if @team.name if @team.save + # Add current user as Master to the team + @team.add_members([current_user.id], UsersProject::MASTER, true) + redirect_to team_path(@team) else render action: :new |