summaryrefslogtreecommitdiffstats
path: root/app/controllers/auth_sources_controller.rb
diff options
context:
space:
mode:
authorEric Davis <edavis@littlestreamsoftware.com>2010-02-15 16:41:21 +0000
committerEric Davis <edavis@littlestreamsoftware.com>2010-02-15 16:41:21 +0000
commitc5f30fde28723ebb6b2f9598ed2f8721287200f0 (patch)
treefbab5e648c58a695e8af13b00afe5e9f885a7322 /app/controllers/auth_sources_controller.rb
parent038a88e970aa7d0512258a903614b99e5f7e98ae (diff)
downloadredmine-c5f30fde28723ebb6b2f9598ed2f8721287200f0.tar.gz
redmine-c5f30fde28723ebb6b2f9598ed2f8721287200f0.zip
Refactor: Merged AuthSourcesController#list and #index
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3436 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers/auth_sources_controller.rb')
-rw-r--r--app/controllers/auth_sources_controller.rb17
1 files changed, 6 insertions, 11 deletions
diff --git a/app/controllers/auth_sources_controller.rb b/app/controllers/auth_sources_controller.rb
index 0f5fba141..eaedb5ba3 100644
--- a/app/controllers/auth_sources_controller.rb
+++ b/app/controllers/auth_sources_controller.rb
@@ -20,18 +20,13 @@ class AuthSourcesController < ApplicationController
before_filter :require_admin
- def index
- list
- render :action => 'list' unless request.xhr?
- end
-
# GETs should be safe (see http://www.w3.org/2001/tag/doc/whenToUseGet.html)
verify :method => :post, :only => [ :destroy, :create, :update ],
:redirect_to => { :action => :list }
- def list
+ def index
@auth_source_pages, @auth_sources = paginate :auth_sources, :per_page => 10
- render :action => "list", :layout => false if request.xhr?
+ render :action => "index", :layout => false if request.xhr?
end
def new
@@ -42,7 +37,7 @@ class AuthSourcesController < ApplicationController
@auth_source = AuthSourceLdap.new(params[:auth_source])
if @auth_source.save
flash[:notice] = l(:notice_successful_create)
- redirect_to :action => 'list'
+ redirect_to :action => 'index'
else
render :action => 'new'
end
@@ -56,7 +51,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 => 'list'
+ redirect_to :action => 'index'
else
render :action => 'edit'
end
@@ -70,7 +65,7 @@ class AuthSourcesController < ApplicationController
rescue => text
flash[:error] = "Unable to connect (#{text})"
end
- redirect_to :action => 'list'
+ redirect_to :action => 'index'
end
def destroy
@@ -79,6 +74,6 @@ class AuthSourcesController < ApplicationController
@auth_source.destroy
flash[:notice] = l(:notice_successful_delete)
end
- redirect_to :action => 'list'
+ redirect_to :action => 'index'
end
end