i have table pro_categories and i am handle add update from admins
controller but can not destroy record from there i mean using admin
controller

<div>
  <h3 align="center">Product Category</h3>
  <table align="center">
    <tr>
      <th>Category Title</th>

    </tr>
    <% @pro_categories.each do |p| %>
    <tr align="center">
      <td><%= p.pcate_name%></td>

      <td><%= link_to_remote('Show',:update => "mcont", :url =>
{:controller => :admins, :action => :cateshow},:with =>
"'id=#{p.id}'")%></td>
    <td><%= link_to_remote('Edit',:update => "mcont", :url =>
{:controller => :admins, :action => :catedit},:with => "'id=#{p.id}'")
%></td>
===================================
    <td><%= link_to 'Destroy', p, :confirm => 'Are you sure?', :method
=> :delete %></td>
=============================
    </tr>
    <%end%>
    <tr><td colspan="3" align="center"><%= link_to_remote('New',:update
=> "mcont", :url => {:controller => :admins, :action => :cateadd }
)%>&nbsp;&nbsp;<%= link_to 'Back',admins_path %></td></tr>
  </table>
</div>

above my file i am display record using pro_categories table so it's
controller p define

if any idea about it i want to delete record in p(pro_categories) table
-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to