Controller/action not working in url

Hey guys,

i am facing some problems in calling an action. see details:

in sale_items controller, i have a function

def saleedit
    render ( :action => 'saleedit')

and i have a file in view/sale_items/saleedit.html.erb.
okay. now i have one more view view/sale_items/new.html.erb. in this
file i have a form like this:

<% form_tag url_for(:action => 'saleedit') do %>
<% end %>

this is working fine with url -->
and goes to saleedit.html.erb on post. in saleedit.html.erb i have some
links for delete in a table, means more than one deletes may be there.
like this:

<td><%= link_to 'Delete', "delete/#{}", :confirm => 'Are you
sure?', :method => :delete %></td>

so when i click on this link, delete function in sale_items controller
is called. i.e.

def delete

     --delete code--
     redirect_to ( :action => 'saleedit')


this is not working. it shows an error -->
ActiveRecord::RecordNotFound in Sale itemsController#show
it is unable to search "saleedit" function and by default goes to show
methos (default function-when no method is found it goes to show
method). please help me out why it is unable to find the method.

in url it is taking "saleedit" as an id (parameter) rathe than an




in place of redirect_to if i use "render (:action => '/saleedit')", it
is working and control goes back to saleedit page, this is what I want.
but the problem is with URL. in this case when we click on delete, the
url becomes -->


so if more than one deletes are there, the next time when we click on
next delete url becomes -->

and shows a Routing Error

No route matches "/sale_items/delete/delete/4" with {:method=>:delete}

so i need a fast solution, i am in hurry. i ma unable to find why it is
performing like this, how url will get changed and why controller is
unable to find a method of its own.

your help is appreciated.
thanks in advance!