Use Hashids (http://hashids.org/ruby/) in your Rails app ActiveRecord models.
find_by_hashid
method to always try and decode, as opposed to find
which tries to find it as an integer first.find
method.Model#find
work with integer model ids as well as hashids.Model#find
work with integers passed in as strings.