link_to_remote / url path question

I have this helper / link_to_remote link I am trying to switch from
destroy/delete to a separate method/action. Here is the original code.

link_to_remote image_tag('delete.png', :class =>
'png', :width=>'12', :height=>'12'), :url => profile_message_path(@p,
message), :method => :delete

Current path that produces looks like this


I need it to become


I don't think I am understanding the api docs for this such as
profile_message_path to be able to figure out how to add another
method/action to that URL string. What should my code look like to get

That's a routing issue; take a look at ActionController::Resources,
specifically the :collection parameter; through it you can introduce
additional resource methods to your routing. E.g.

  map.resources :profiles do |profile|
    profile.resources :messages, :collection => { :remove => :delete }

would give you


- close enough?