mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-24 03:00:12 +01:00
Use Rails helpers for the delete menu item
Instead of creating id and routes manually, use the helpers that Rails provides in order to do this for us.
This commit is contained in:
parent
3bef4daacc
commit
6677af6f8f
2 changed files with 6 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue