Fixed global ids for ActiveRecord