rails/rails — pull request #13868 by mauricio (2014-01-29 05:32:36+00:00)
Title: Correctly send the string given to lock! and reload(:lock) to the lock scope - fixes #13788

As per the documentation at [lock!](https://github.com/rails/rails/blob/master/activerecord/lib/active_record/locking/pessimistic.rb#L61), if the `:lock` option is a string it should use the given SQL to generate the lock statement.

This change fixes this issue and also includes two new tests to make sure this behaviour is maintained.