search for: destroy_price

Displaying 1 result from an estimated 1 matches for "destroy_price".

2006 Aug 09
2
has_many through delete issue
...correctly display the data through by navigating through the object model. What I''m having trouble figuring out is how to delete Price records form the association table. Within one of my forms I have the following: <%= link_to ''Destroy'', { :action => ''destroy_price'', :id => @media.id, :price_code_id =>price_code.id }, :confirm => ''Are you sure?'', :post => true %> Add here is the destroy_price action in the controller: def destroy_price Media.find(params[:id]).prices.find(params[:price_code_id]).destroy redirect...