diff options
author | Eric Davis <edavis@littlestreamsoftware.com> | 2010-03-18 15:49:11 +0000 |
---|---|---|
committer | Eric Davis <edavis@littlestreamsoftware.com> | 2010-03-18 15:49:11 +0000 |
commit | b5d9a1dfbdbaf3b4193efb3bf3654a33670ff0d6 (patch) | |
tree | 7b886f83599b1a2f7e1c891e9982eb4715e12f38 /app/controllers/groups_controller.rb | |
parent | f741ca726978cfc352a0387f4694d7e29fb72803 (diff) | |
download | redmine-b5d9a1dfbdbaf3b4193efb3bf3654a33670ff0d6.tar.gz redmine-b5d9a1dfbdbaf3b4193efb3bf3654a33670ff0d6.zip |
Refactor: Extract method to the Member model
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3601 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers/groups_controller.rb')
-rw-r--r-- | app/controllers/groups_controller.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/app/controllers/groups_controller.rb b/app/controllers/groups_controller.rb index 96e59c288..68a0e9d38 100644 --- a/app/controllers/groups_controller.rb +++ b/app/controllers/groups_controller.rb @@ -138,8 +138,7 @@ class GroupsController < ApplicationController def edit_membership @group = Group.find(params[:id]) - @membership = params[:membership_id] ? Member.find(params[:membership_id]) : Member.new(:principal => @group) - @membership.attributes = params[:membership] + @membership = Member.edit_membership(params[:membership_id], params[:membership], @group) @membership.save if request.post? respond_to do |format| format.html { redirect_to :controller => 'groups', :action => 'edit', :id => @group, :tab => 'memberships' } |