diff options
author | Vijay Dev <vijaydev.cse@gmail.com> | 2011-10-30 14:47:23 +0530 |
---|---|---|
committer | Vijay Dev <vijaydev.cse@gmail.com> | 2011-10-30 14:47:23 +0530 |
commit | c809de829198d1a07bd755b79e26ac234374977e (patch) | |
tree | 84319fec1b37f58a9508c455ff9f7644e68f80e5 /activerecord | |
parent | 9d1ba3755e9af6196240fc18472e2cc4fcbb4911 (diff) | |
parent | f936996f69ec728b7c0d38cd30084fc74943f9c7 (diff) | |
download | rails-c809de829198d1a07bd755b79e26ac234374977e.tar.gz rails-c809de829198d1a07bd755b79e26ac234374977e.tar.bz2 rails-c809de829198d1a07bd755b79e26ac234374977e.zip |
Merge branch 'master' of github.com:lifo/docrails
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/locking/optimistic.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/locking/optimistic.rb b/activerecord/lib/active_record/locking/optimistic.rb index 2df3309648..1a29ded787 100644 --- a/activerecord/lib/active_record/locking/optimistic.rb +++ b/activerecord/lib/active_record/locking/optimistic.rb @@ -37,6 +37,9 @@ module ActiveRecord # You're then responsible for dealing with the conflict by rescuing the exception and either rolling back, merging, # or otherwise apply the business logic needed to resolve the conflict. # + # This locking mechanism will function inside a single Ruby process. To make it work across all + # web requests, the recommended approach is to add +lock_version+ as a hidden field to your form. + # # You must ensure that your database schema defaults the +lock_version+ column to 0. # # This behavior can be turned off by setting <tt>ActiveRecord::Base.lock_optimistically = false</tt>. |