no call funtion

Maite Piedra wrote:

hello everybody I have this in my view

      <tr id= "id_<%= x.nombre%>">
        <td width="200"><%= x.nombre%></td>
        <td width="10"><%= link_to_remote image_tag("delete.png"),
:url=>{:controller=>"merca_usuarios",
        :action=>"destroy", :id=>x}, :complete => "new
Effect.Fade('id_#{x.nombre}')" %> </td>

when I click in delete image this line fade n the view but don't delete
this id of the database, so action destroy never call, why??? what
happen???

Please post your controller's action code, too, and your test cases.

And shouldn't :id => x be :id => x.id ?

Maite Piedra wrote:
> hello everybody I have this in my view

> <tr id= "id_<%= x.nombre%>">
> <td width="200"><%= x.nombre%></td>
> <td width="10"><%= link_to_remote image_tag("delete.png"),
> :url=>{:controller=>"merca_usuarios",
> :action=>"destroy", :id=>x}, :complete => "new
> Effect.Fade('id_#{x.nombre}')" %> </td>

> when I click in delete image this line fade n the view but don't delete
> this id of the database, so action destroy never call, why??? what
> happen???

Please post your controller's action code, too, and your test cases.

And shouldn't :id => x be :id => x.id ?

that doesn't matter. url_for special cases :id and tries to call
to_param on what you give it if it's an AR object, and the default
definition of to_param is just id.

Fred