You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Let say we have User that inherits from ActiveRecord::Base and Admin that inherits from User. The User is a voter (make_voter). Creating an up / down vote for an instance of User works great. However, an up / down vote for an instance of Admin will incorrectly set the voter_type to "User". To compound issues, #up_voted? / #down_voted? check against a voter_type of "Admin" for Admin instances, so a voteable item that has been voted on will incorrectly report that you have not yet voted on the item in question. With this check failing, you could incorrectly display voting controls in your UI, which will raise an AlreadyVotedError if implemented against #up_vote / #down_vote.
Let say we have User that inherits from ActiveRecord::Base and Admin that inherits from User. The User is a voter (make_voter). Creating an up / down vote for an instance of User works great. However, an up / down vote for an instance of Admin will incorrectly set the voter_type to "User". To compound issues, #up_voted? / #down_voted? check against a voter_type of "Admin" for Admin instances, so a voteable item that has been voted on will incorrectly report that you have not yet voted on the item in question. With this check failing, you could incorrectly display voting controls in your UI, which will raise an AlreadyVotedError if implemented against #up_vote / #down_vote.
Failing test: jeffreyiacono@2d4aa11
The text was updated successfully, but these errors were encountered: