Hi Aravind,

I am not sure if I understood your question correctly but I will give a 
try.
I think you want to delete all associated records with another type of 
the Model.

class Body
   has_many: boobs, dependent: :destroy
end

>> In this instance destroy parameter is responsible for generating/using code 
that removes all dependent boob if the body instance is destroyed.


Did I get you right?

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/bc105e8424a2ab45885a8ad12120507c%40ruby-forum.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to