I have one field that needs to be incremented automatically, but be
scoped to another column. So it should increment based on the last value
of the previous row with the same value of the scoped column.
I'm not trying to replace ID with another primary key or anything crazy
like that, just trying to auto-increment a database column!
Any idea of how to do this? Rails 3. Thanks!