From 718701997506c243cee324909ae3e8ba3e0afc63 Mon Sep 17 00:00:00 2001 From: Michael Bina Date: Sun, 23 Dec 2012 19:26:19 -0800 Subject: [PATCH] change deprecated id call to object_id. See http://ruby-doc.org/core-1.9.3/Object.html#method-i-object_id --- lib/acts_as_indexed/class_methods.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/acts_as_indexed/class_methods.rb b/lib/acts_as_indexed/class_methods.rb index 13c3b38..812a9ec 100644 --- a/lib/acts_as_indexed/class_methods.rb +++ b/lib/acts_as_indexed/class_methods.rb @@ -174,10 +174,10 @@ def build_index def sort(ranked_records) ranked_records.sort { |a, b| a_score = a.last - a_id = a.first.is_a?(Fixnum) ? a.first : a.first.id + a_id = a.first.is_a?(Fixnum) ? a.first : a.first.object_id b_score = b.last - b_id = b.first.is_a?(Fixnum) ? b.first : b.first.id + b_id = b.first.is_a?(Fixnum) ? b.first : b.first.object_id if a_score == b_score a_id <=> b_id