summaryrefslogtreecommitdiffstats
path: root/app/controllers/versions_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/versions_controller.rb')
-rw-r--r--app/controllers/versions_controller.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/controllers/versions_controller.rb b/app/controllers/versions_controller.rb
index 03af71b99..30d8f3bf2 100644
--- a/app/controllers/versions_controller.rb
+++ b/app/controllers/versions_controller.rb
@@ -79,7 +79,7 @@ class VersionsController < ApplicationController
respond_to do |format|
format.html do
flash[:notice] = l(:notice_successful_create)
- redirect_to :controller => 'projects', :action => 'settings', :tab => 'versions', :id => @project
+ redirect_back_or_default :controller => 'projects', :action => 'settings', :tab => 'versions', :id => @project
end
format.js do
# IE doesn't support the replace_html rjs method for select box options
@@ -108,7 +108,7 @@ class VersionsController < ApplicationController
attributes.delete('sharing') unless @version.allowed_sharings.include?(attributes['sharing'])
if @version.update_attributes(attributes)
flash[:notice] = l(:notice_successful_update)
- redirect_to :controller => 'projects', :action => 'settings', :tab => 'versions', :id => @project
+ redirect_back_or_default :controller => 'projects', :action => 'settings', :tab => 'versions', :id => @project
else
respond_to do |format|
format.html { render :action => 'edit' }
@@ -127,7 +127,7 @@ class VersionsController < ApplicationController
def destroy
if @version.fixed_issues.empty?
@version.destroy
- redirect_to :controller => 'projects', :action => 'settings', :tab => 'versions', :id => @project
+ redirect_back_or_default :controller => 'projects', :action => 'settings', :tab => 'versions', :id => @project
else
flash[:error] = l(:notice_unable_delete_version)
redirect_to :controller => 'projects', :action => 'settings', :tab => 'versions', :id => @project