diff options
author | Eric Davis <edavis@littlestreamsoftware.com> | 2010-02-15 16:41:27 +0000 |
---|---|---|
committer | Eric Davis <edavis@littlestreamsoftware.com> | 2010-02-15 16:41:27 +0000 |
commit | 49bfee053593604ad2a3eb487ac1e5b9fef5dd8c (patch) | |
tree | abffc83b6398207ecd1ac6701614e67b9c268225 /app/controllers | |
parent | c5f30fde28723ebb6b2f9598ed2f8721287200f0 (diff) | |
download | redmine-49bfee053593604ad2a3eb487ac1e5b9fef5dd8c.tar.gz redmine-49bfee053593604ad2a3eb487ac1e5b9fef5dd8c.zip |
Refactor: Merged TrackersController#list and #index
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3437 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/trackers_controller.rb | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/app/controllers/trackers_controller.rb b/app/controllers/trackers_controller.rb index 1b7eddcb9..8a44ad825 100644 --- a/app/controllers/trackers_controller.rb +++ b/app/controllers/trackers_controller.rb @@ -20,16 +20,11 @@ class TrackersController < ApplicationController before_filter :require_admin - def index - list - render :action => 'list' unless request.xhr? - end - - verify :method => :post, :only => :destroy, :redirect_to => { :action => :list } + verify :method => :post, :only => :destroy, :redirect_to => { :action => :index } - def list + def index @tracker_pages, @trackers = paginate :trackers, :per_page => 10, :order => 'position' - render :action => "list", :layout => false if request.xhr? + render :action => "index", :layout => false if request.xhr? end def new @@ -40,7 +35,7 @@ class TrackersController < ApplicationController @tracker.workflows.copy(copy_from) end flash[:notice] = l(:notice_successful_create) - redirect_to :action => 'list' + redirect_to :action => 'index' return end @trackers = Tracker.find :all, :order => 'position' @@ -51,7 +46,7 @@ class TrackersController < ApplicationController @tracker = Tracker.find(params[:id]) if request.post? and @tracker.update_attributes(params[:tracker]) flash[:notice] = l(:notice_successful_update) - redirect_to :action => 'list' + redirect_to :action => 'index' return end @projects = Project.find(:all) @@ -64,6 +59,6 @@ class TrackersController < ApplicationController else @tracker.destroy end - redirect_to :action => 'list' + redirect_to :action => 'index' end end |