I am trying to use link_to and use this code, but getting the error in the title:
<code> <%= link_to (vehicle_path(@vehicle), :method => :delete, {:confirm => "Are you sure?", :title => "Borrar #{@vehicle.plate}"}) do %> <%= image_tag "/assets/icons_big/delete.png" %> <span>Delete</span> <% end %> </code>
I have tried without the brackets without luck and have not found any example that works for this.
I have even tried:
<code> <%= link_to (vehicle_path(@vehicle), :method => :delete) do %> <%= image_tag "/assets/icons_big/delete.png" %> <span>Delete</span> <% end %> </code>
Again without luck, any help is appreciated.
PS. for clarification, using this works <code> <%= link_to (vehicle_path(@vehicle)) do %> <%= image_tag "/assets/icons_big/delete.png" %> <span>Delete</span> <% end %> </code> or using this works too <code> <%= link_to "Delete", @vehicle, :method => :delete, :confirm => "Are you sure?", :title => "Delete #{@vehicle.plate}" %> </code>
thanks again.