module ActiveRecord::Obfuscator

Public Instance Methods

encoded_id() click to toggle source
# File lib/ext/rails/active_record/obfuscator.rb, line 5
def encoded_id
  ScatterSwap.hash(id, 0, 9).try(:to_i) # use 9, so standard 32-bit Int won't overflow
end