Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed model reload

  • Loading branch information...
commit bd8fee2e42a87258b06653a5d8c63ad80fc4e0f6 1 parent 5170c66
Hari hcarreras authored
Showing with 2 additions and 1 deletion.
  1. +1 −1  app/models/user.rb
  2. +1 −0  spec/models/user_spec.rb
2  app/models/user.rb
View
@@ -79,7 +79,7 @@ def unfollow! followee
# this method returns true if we're following the given Hacker, and
# false otherwise
def following? hacker
- following_ids.include? hacker.id
+ following.include? hacker
end
# Everyone should have at least one follower. And steve would like to follow
1  spec/models/user_spec.rb
View
@@ -14,6 +14,7 @@
bob.follow!(mozart)
bob.following?(mozart).should be_true
bob.unfollow!(mozart)
+ bob.reload
bob.following?(mozart).should be_false
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.