Use named routes in controllers.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10981 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2012-12-11 17:51:30 +00:00
parent cf66561b1e
commit 0b96094680
13 changed files with 370 additions and 39 deletions

View File

@@ -34,7 +34,7 @@ class AuthSourcesController < ApplicationController
@auth_source = AuthSource.new_subclass_instance(params[:type], params[:auth_source])
if @auth_source.save
flash[:notice] = l(:notice_successful_create)
redirect_to :action => 'index'
redirect_to auth_sources_path
else
render :action => 'new'
end
@@ -48,7 +48,7 @@ class AuthSourcesController < ApplicationController
@auth_source = AuthSource.find(params[:id])
if @auth_source.update_attributes(params[:auth_source])
flash[:notice] = l(:notice_successful_update)
redirect_to :action => 'index'
redirect_to auth_sources_path
else
render :action => 'edit'
end
@@ -62,7 +62,7 @@ class AuthSourcesController < ApplicationController
rescue Exception => e
flash[:error] = l(:error_unable_to_connect, e.message)
end
redirect_to :action => 'index'
redirect_to auth_sources_path
end
def destroy
@@ -71,6 +71,6 @@ class AuthSourcesController < ApplicationController
@auth_source.destroy
flash[:notice] = l(:notice_successful_delete)
end
redirect_to :action => 'index'
redirect_to auth_sources_path
end
end