ish_models 0.0.33.169 → 0.0.33.170
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mongoid/votable.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 411adafeb7c2632e78c97d10b851b9b957161ebb5626c95e451d86db86ca2a5b
|
4
|
+
data.tar.gz: 562dd7d7ba8db2acc414096ef8b1ab9c3b93e9f915b1aa1e650340b12054df02
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2367b28798662b398d6be6e73a11ff0c1866b631e4208d8c97ccbe88d29b5b873850a10706be4672378de9178267d6314a52c46107932e56658bea4b6f8267ac
|
7
|
+
data.tar.gz: 7b17156567dcd8ffe6920782ecbc05c6bdadc20518e4752dbdcc0fd05eaaf645bcb8221503e1f1fd778dac0fa52ce7ebc181d5418fe8f1edc0c24db3c1d08ea5
|
data/lib/mongoid/votable.rb
CHANGED
@@ -190,7 +190,7 @@ module Mongoid
|
|
190
190
|
#
|
191
191
|
# @param [Mongoid Object, BSON::ObjectId] voter is Mongoid object the id of the voter who made the vote
|
192
192
|
def vote_value(voter)
|
193
|
-
voter_id = voter.is_a?(BSON::ObjectId) ? voter : voter.is_a?(String) ? voter : voter.id
|
193
|
+
voter_id = voter.is_a?(BSON::ObjectId) ? voter.to_s : voter.is_a?(String) ? voter : voter.id.to_s
|
194
194
|
|
195
195
|
return :up if up_voter_ids.try(:include?, voter_id)
|
196
196
|
return :down if down_voter_ids.try(:include?, voter_id)
|