MSSQL optimistic locking

Thanks for all the help. You are amazing with Ruby. I learned a lot.
The changes speak for themselves (you wrote most of it...)