a couple more passing specs

This commit is contained in:
zhitomirskiyi 2010-12-27 22:23:41 -08:00
parent 3d7d8b51d2
commit 11153cf2ca
2 changed files with 2 additions and 7 deletions

View file

@ -14,7 +14,7 @@ class Post < ActiveRecord::Base
xml_attr :public
xml_attr :created_at
has_many :comments, :order => 'created_at ASC'
has_many :comments, :order => 'created_at ASC', :dependent => :destroy
has_many :post_visibilities
has_many :aspects, :through => :post_visibilities
belongs_to :person
@ -23,7 +23,6 @@ class Post < ActiveRecord::Base
@@per_page = 10
before_destroy :propogate_retraction
after_destroy :destroy_comments
def user_refs
self.post_visibilities.count
@ -60,10 +59,6 @@ class Post < ActiveRecord::Base
end
protected
def destroy_comments
comments.each { |c| c.destroy }
end
def propogate_retraction
self.person.owner.retract(self) if self.person.owner
end

View file

@ -265,7 +265,7 @@ class User < ActiveRecord::Base
params[:image_url_small] = photo.url(:thumb_small)
end
if self.person.profile.update_attributes(params)
push_to_people profile, self.contacts(:pending => false).includes(:person).map{|c| c.person}
push_to_people profile, self.contacts.where(:pending => false).includes(:person).map{|c| c.person}
true
else
false