I am facing the following issue. My game
object has two associated players
, as we can see:
=> game.players.count
2
However, the pluck
method is returning duplicated values:
=> game.players.pluck :name
["Alice", "Alice", "Bob", "Bob"]
Both Game
and Player
extend ActiveRecord::Base
. I have absolutely no idea of what is really going on here.
Relevant gems:
rails 4.2.8
mysql2 0.3.21
Any clue about what could be going on? Thanks in advance.