Display all versions of individual records in Papertrail

后端 未结 2 1606
花落未央
花落未央 2021-01-16 00:39

I\'m building a league system and currently it stores and updates the players \'elo score\' depending on the result. Now, I\'m trying to add in \'HighCharts\' to display the

2条回答
  •  余生分开走
    2021-01-16 01:35

    Here's a one-liner version of @MrDanA's answer :

    elo_scores = self.versions.map{|version| version.reify.elo_scores}
    

    note that you can't check if version.reify.nil? though

提交回复
热议问题