Permalink
Browse files

Fixed model reload

  • Loading branch information...
1 parent 5170c66 commit bd8fee2e42a87258b06653a5d8c63ad80fc4e0f6 @hcarreras hcarreras committed Feb 10, 2014
Showing with 2 additions and 1 deletion.
  1. +1 −1 app/models/user.rb
  2. +1 −0 spec/models/user_spec.rb
View
2 app/models/user.rb
@@ -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
View
1 spec/models/user_spec.rb
@@ -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

0 comments on commit bd8fee2

Please sign in to comment.