diff --git a/lib/paper_trail/version.rb b/lib/paper_trail/version.rb
index <HASH>..<HASH> 100644
--- a/lib/paper_trail/version.rb
+++ b/lib/paper_trail/version.rb
@@ -116,7 +116,8 @@ class Version < ActiveRecord::Base
   end
 
   def index
-    sibling_versions.select(:id).order("id ASC").map(&:id).index(self.id)
+    id_column = self.class.primary_key
+    sibling_versions.select(id_column.to_sym).order("#{id_column} ASC").map(&id_column.to_sym).index(self.send(id_column))
   end
 
   private
Refactor index method on version to call the model's primary key instead of assuming it is "id."