diff --git a/app/views/enumerations/destroy.html.erb b/app/views/enumerations/destroy.html.erb index 02e66bd..3b47b40 100644 --- a/app/views/enumerations/destroy.html.erb +++ b/app/views/enumerations/destroy.html.erb @@ -4,7 +4,7 @@

<%= l(:text_enumeration_destroy_question, @enumeration.objects_count) %>

-<%= select_tag 'reassign_to_id', ("" + options_from_collection_for_select(@enumerations, 'id', 'name')) %>

+<%= select_tag 'reassign_to_id', (content_tag('option', "--- #{l(:actionview_instancetag_blank_option)} ---") + options_from_collection_for_select(@enumerations, 'id', 'name')) %>

<%= submit_tag l(:button_apply) %> diff --git a/test/functional/enumerations_controller_test.rb b/test/functional/enumerations_controller_test.rb index 7378e6f..b13fc86 100644 --- a/test/functional/enumerations_controller_test.rb +++ b/test/functional/enumerations_controller_test.rb @@ -105,6 +105,9 @@ class EnumerationsControllerTest < ActionController::TestCase assert_response :success assert_template 'destroy' assert_not_nil Enumeration.find_by_id(4) + assert_select 'select[name=reassign_to_id]' do + assert_select 'option[value=6]', :text => 'High' + end end def test_destroy_enumeration_in_use_with_reassignment