Removing posts array from person

This commit is contained in:
Raphael 2010-08-17 23:27:17 -07:00
parent 4a4686ce6e
commit 42cc1da9f6

View file

@ -20,7 +20,6 @@ class Person
belongs_to :owner, :class_name => 'User' belongs_to :owner, :class_name => 'User'
one :profile, :class_name => 'Profile' one :profile, :class_name => 'Profile'
many :posts, :class_name => 'Post', :foreign_key => :person_id
many :albums, :class_name => 'Album', :foreign_key => :person_id many :albums, :class_name => 'Album', :foreign_key => :person_id
@ -92,11 +91,4 @@ class Person
self.url = self.url + '/' if self.url[-1,1] != '/' self.url = self.url + '/' if self.url[-1,1] != '/'
end end
end end
private
def remove_all_traces
self.posts.delete_all
end
end end