Removed EnumerationsController#list action.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7973 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2011-11-28 20:23:57 +00:00
parent b8a924e4e1
commit 2dbbdafbc6
3 changed files with 4 additions and 10 deletions

View File

@ -24,16 +24,10 @@ class EnumerationsController < ApplicationController
include CustomFieldsHelper include CustomFieldsHelper
def index def index
list
render :action => 'list'
end end
# GETs should be safe (see http://www.w3.org/2001/tag/doc/whenToUseGet.html)
verify :method => :post, :only => [ :destroy, :create, :update ], verify :method => :post, :only => [ :destroy, :create, :update ],
:redirect_to => { :action => :list } :redirect_to => { :action => :index }
def list
end
def new def new
begin begin
@ -48,7 +42,7 @@ class EnumerationsController < ApplicationController
@enumeration.type = params[:enumeration][:type] @enumeration.type = params[:enumeration][:type]
if @enumeration.save if @enumeration.save
flash[:notice] = l(:notice_successful_create) flash[:notice] = l(:notice_successful_create)
redirect_to :action => 'list', :type => @enumeration.type redirect_to :action => 'index', :type => @enumeration.type
else else
render :action => 'new' render :action => 'new'
end end
@ -63,7 +57,7 @@ class EnumerationsController < ApplicationController
@enumeration.type = params[:enumeration][:type] if params[:enumeration][:type] @enumeration.type = params[:enumeration][:type] if params[:enumeration][:type]
if @enumeration.update_attributes(params[:enumeration]) if @enumeration.update_attributes(params[:enumeration])
flash[:notice] = l(:notice_successful_update) flash[:notice] = l(:notice_successful_update)
redirect_to :action => 'list', :type => @enumeration.type redirect_to :action => 'index', :type => @enumeration.type
else else
render :action => 'edit' render :action => 'edit'
end end

View File

@ -34,7 +34,7 @@ class EnumerationsControllerTest < ActionController::TestCase
def test_index def test_index
get :index get :index
assert_response :success assert_response :success
assert_template 'list' assert_template 'index'
end end
def test_destroy_enumeration_not_in_use def test_destroy_enumeration_not_in_use