How can you do a numbering scheme like Github does with repositories issues and pull requests inside a project (1, 2, 3, ..., n
)?
Assume we have a Project
model and also have a Post
model, where Post belongs_to Project
.
I could imagine looking for the last Post
for a given project and incrementing that number, but I think this could easily lead to a race condition.