Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

At our place, we call them "peuteterli" (losely translated: "could-be-ish" constructed from the French "peut ĂȘtre" and slapped on the local German diminutive -li.

For the ID issue I have a monkey patch for Activerecord:

      if ["test", "cucumber"].include? Rails.env
        class ActiveRecord::Base
          before_create :set_id

          def set_id
            self.id ||= SecureRandom.random_number(999_999_999)
          end
        end
      end
Unique IDs are also helpful when scanning for specific objects during test development. When all objects of different classes start with 1, it is hard to following the connections.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: