[#809] Fixed a nil object error in params.

This commit is contained in:
Eric Davis 2010-01-19 13:40:29 -08:00
parent a3b1127ef8
commit 66fe8287ce
2 changed files with 2 additions and 2 deletions

View File

@ -131,7 +131,7 @@ class GroupsController < ApplicationController
if params[:project_ids] # Multiple memberships, one per project
params[:project_ids].each do |project_id|
@membership = Member.edit_membership(params[:membership_id], params[:membership].merge(:project_id => project_id), @group)
@membership = Member.edit_membership(params[:membership_id], (params[:membership]|| {}).merge(:project_id => project_id), @group)
@membership.save if request.post?
end
else # Single membership

View File

@ -199,7 +199,7 @@ class UsersController < ApplicationController
def edit_membership
if params[:project_ids] # Multiple memberships, one per project
params[:project_ids].each do |project_id|
@membership = Member.edit_membership(params[:membership_id], params[:membership].merge(:project_id => project_id), @user)
@membership = Member.edit_membership(params[:membership_id], (params[:membership] || {}).merge(:project_id => project_id), @user)
@membership.save if request.post?
end
else # Single membership