diff options
Diffstat (limited to 'app/controllers/members_controller.rb')
-rw-r--r-- | app/controllers/members_controller.rb | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/app/controllers/members_controller.rb b/app/controllers/members_controller.rb index ad9e44ff9..dfaad7fa3 100644 --- a/app/controllers/members_controller.rb +++ b/app/controllers/members_controller.rb @@ -21,15 +21,19 @@ class MembersController < ApplicationController def edit if request.post? and @member.update_attributes(params[:member]) - flash[:notice] = l(:notice_successful_update) - redirect_to :controller => 'projects', :action => 'settings', :tab => 'members', :id => @project + respond_to do |format| + format.html { redirect_to :controller => 'projects', :action => 'settings', :tab => 'members', :id => @project } + format.js { render(:update) {|page| page.replace_html "tab-content-members", :partial => 'projects/members'} } + end end end def destroy @member.destroy - flash[:notice] = l(:notice_successful_delete) - redirect_to :controller => 'projects', :action => 'settings', :tab => 'members', :id => @project + respond_to do |format| + format.html { redirect_to :controller => 'projects', :action => 'settings', :tab => 'members', :id => @project } + format.js { render(:update) {|page| page.replace_html "tab-content-members", :partial => 'projects/members'} } + end end private |