spec/models.rb in jchupp-is_paranoid-0.8.1 vs spec/models.rb in jchupp-is_paranoid-0.8.2

- old
+ new

@@ -19,15 +19,22 @@ end end class Component < ActiveRecord::Base #:nodoc: is_paranoid + belongs_to :android, :dependent => :destroy + has_many :sub_components, :dependent => :destroy NEW_NAME = 'Something Else!' after_destroy :change_name def change_name self.update_attribute(:name, NEW_NAME) end +end + +class SubComponent < ActiveRecord::Base #:nodoc: + is_paranoid + belongs_to :component, :dependent => :destroy end class Memory < ActiveRecord::Base #:nodoc: is_paranoid belongs_to :android, :class_name => "Android", :foreign_key => "parent_id" \ No newline at end of file