model view controller - Delete not working in Rails 3 -


i have app in rails 3 , run crud working except delete link.when click it takes me show action , want delete particular record.below codes

view

index.html.erb:

<td><%= link_to 'destroy', member, :confirm => 'are sure?', :method =>:destroy %></td> 

controller

  # delete /members/1   # delete /members/1.xml   def destroy     @member = member.find(params[:id])     @member.destroy      respond_to |format|       format.html { redirect_to(members_url) }       format.xml  { head :ok }     end   end 

...any plz..

check javascript libraries. in application had same problem because removed prototype , did not install jquery.

this problem occurs because delete method emulated via javascript.


Comments

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -