Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR RUBY

rails delete child on parent delete

class Widgets < ActiveRecord::Base
  has_many :whatevers, :dependent => :destroy
end
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #rails #delete #child #parent #delete
ADD COMMENT
Topic
Name
4+7 =