summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/controllers/enumerations_controller.rb12
-rw-r--r--app/views/enumerations/index.html.erb (renamed from app/views/enumerations/list.html.erb)0
-rw-r--r--test/functional/enumerations_controller_test.rb2
3 files changed, 4 insertions, 10 deletions
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
index 80f7ef3dc..80f7ef3dc 100644
--- a/app/views/enumerations/list.html.erb
+++ b/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