Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

+ Notes

  • Loading branch information...
commit 0fc0e348e5aae7eae61b1ef3f11cc30bc6ec0f2f 1 parent a201033
@floere authored
Showing with 5 additions and 0 deletions.
  1. +5 −0 server/lib/picky/bundle_realtime.rb
View
5 server/lib/picky/bundle_realtime.rb
@@ -33,6 +33,9 @@ def remove id
@similarity.delete self.similarity_strategy.encode(str_or_sym)
else
@weights[str_or_sym] = self.weight_strategy.weight_for ids.size
+ # @weights[str_or_sym] = self.weight_strategy.respond_to?(:[]) &&
+ # self.weight_strategy[str_or_sym] ||
+ # self.weight_strategy.weight_for(ids.size)
end
end
@@ -42,6 +45,8 @@ def remove id
# Returns a reference to the array where the id has been added.
#
def add id, str_or_sym, where = :unshift
+ # Use a generalized strategy.
+ #
str_or_syms = @realtime[id] ||= []
# Inverted.
Please sign in to comment.
Something went wrong with that request. Please try again.