I have a collection of characters
in following
. Each character
has a unique handle. I've checked the database to make sure there is only one character
with the handle barry1
. I'm trying to do:
following.include?(other_character) # false
It's returning false, but I'm sure that barry1
is in following
. It thinks the id
s are different, but there's only one barry1
. What's going on?
character.rb
has_many :following, through: :active_follow_relationships, source: :followed
puts:
puts following.first.handle # barry1
puts other_character.handle # barry1
puts following.first # #<Character:0x007fef15231490>
puts other_character # #<Character:0x007fef09bb4d58>
puts following.first.id # 21
puts other_character.id # 8