From 2dbbdafbc6c4d2b83565c16ea2c19a824ff3acbf Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Mon, 28 Nov 2011 20:23:57 +0000 Subject: [PATCH] Removed EnumerationsController#list action. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7973 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/controllers/enumerations_controller.rb | 12 +++--------- .../enumerations/{list.html.erb => index.html.erb} | 0 test/functional/enumerations_controller_test.rb | 2 +- 3 files changed, 4 insertions(+), 10 deletions(-) rename app/views/enumerations/{list.html.erb => index.html.erb} (100%) diff --git a/app/controllers/enumerations_controller.rb b/app/controllers/enumerations_controller.rb index 73d39dd4d..c567b6ae6 100644 --- a/app/controllers/enumerations_controller.rb +++ b/app/controllers/enumerations_controller.rb @@ -24,16 +24,10 @@ class EnumerationsController < ApplicationController include CustomFieldsHelper def index - list - render :action => 'list' 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 - end + :redirect_to => { :action => :index } def new begin @@ -48,7 +42,7 @@ class EnumerationsController < ApplicationController @enumeration.type = params[:enumeration][:type] if @enumeration.save flash[:notice] = l(:notice_successful_create) - redirect_to :action => 'list', :type => @enumeration.type + redirect_to :action => 'index', :type => @enumeration.type else render :action => 'new' end @@ -63,7 +57,7 @@ class EnumerationsController < ApplicationController @enumeration.type = params[:enumeration][:type] if params[:enumeration][:type] if @enumeration.update_attributes(params[:enumeration]) flash[:notice] = l(:notice_successful_update) - redirect_to :action => 'list', :type => @enumeration.type + redirect_to :action => 'index', :type => @enumeration.type else render :action => 'edit' end diff --git a/app/views/enumerations/list.html.erb b/app/views/enumerations/index.html.erb similarity index 100% rename from app/views/enumerations/list.html.erb rename to app/views/enumerations/index.html.erb diff --git a/test/functional/enumerations_controller_test.rb b/test/functional/enumerations_controller_test.rb index 3ab40b5cf..d306ef926 100644 --- a/test/functional/enumerations_controller_test.rb +++ b/test/functional/enumerations_controller_test.rb @@ -34,7 +34,7 @@ class EnumerationsControllerTest < ActionController::TestCase def test_index get :index assert_response :success - assert_template 'list' + assert_template 'index' end def test_destroy_enumeration_not_in_use