Skip to content

Commit

Permalink
ensure similarity values are floats
Browse files Browse the repository at this point in the history
  • Loading branch information
ajjahn committed Apr 23, 2014
1 parent bd143ce commit 4df3be8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/recommendable/helpers/calculations.rb
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ def similarity_total_for(user_id, set)
Recommendable.redis.zscore(similarity_set, id)
end
end
similarity_values.reduce(&:+).to_f
similarity_values.map(&:to_f).reduce(&:+).to_f
end

def update_score_for(klass, id)
Expand Down

0 comments on commit 4df3be8

Please sign in to comment.