Hey there, i am trying to set a site by the site_id of one of its children, i think that after i destroy the child it looses the site i am trying to create, the following code gives me an error about couldn''t find site with id=0 <td><%= link_to ''Destroy'', { :action => ''destroy'', :id => site_note }, :confirm => ''Are you sure?'', :post => true %></td> def destroy @site_note = SiteNote.find(params[:id]) @site = Site.find(@site_note.site_id) @site_note.destroy redirect_to :action => ''list'', :id => @site end any ideas ? sk --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---