diff --git a/app/helpers/todos_helper.rb b/app/helpers/todos_helper.rb index d1cdfa60..8431f6bf 100644 --- a/app/helpers/todos_helper.rb +++ b/app/helpers/todos_helper.rb @@ -166,7 +166,7 @@ module TodosHelper t('todos.delete'), {:controller => 'todos', :action => 'destroy', :id => todo.id}, :class => "icon_delete_item", - :id => "delete_#{dom_id(todo)}", + :id => dom_id(todo, "delete"), :x_confirm_message => t('todos.confirm_delete', :description => todo.description), :title => t('todos.delete_action')); end diff --git a/test/helpers/todo_helpers_test.rb b/test/helpers/todo_helpers_test.rb index 4d0940a7..5db3203d 100644 --- a/test/helpers/todo_helpers_test.rb +++ b/test/helpers/todo_helpers_test.rb @@ -7,4 +7,9 @@ class TodosHelpersTest < ActionView::TestCase html = remote_edit_button(todos(:call_bill)) assert_equal "\"Edit\"", html end + + test "remote_delete_menu" do + html = remote_delete_menu_item(todos(:call_bill)) + assert_equal "Delete", html + end end