diff options
| author | Vijay Dev <vijaydev.cse@gmail.com> | 2012-02-01 22:25:52 +0530 | 
|---|---|---|
| committer | Vijay Dev <vijaydev.cse@gmail.com> | 2012-02-01 22:25:52 +0530 | 
| commit | d2c64009482d38d4894dd09d2d1e2fb4a165ecac (patch) | |
| tree | 42a4fa8d1b49d596c53b94ca21646f05418d3c67 /activerecord | |
| parent | de0043d794e8ba05a15d28db76e7deaf847183a2 (diff) | |
| parent | e1dbcdcacf62d13914c9e7ec71f0f7319ad32b4a (diff) | |
| download | rails-d2c64009482d38d4894dd09d2d1e2fb4a165ecac.tar.gz rails-d2c64009482d38d4894dd09d2d1e2fb4a165ecac.tar.bz2 rails-d2c64009482d38d4894dd09d2d1e2fb4a165ecac.zip  | |
Merge branch 'master' of github.com:lifo/docrails
Diffstat (limited to 'activerecord')
| -rw-r--r-- | activerecord/lib/active_record/locking/optimistic.rb | 10 | 
1 files changed, 6 insertions, 4 deletions
diff --git a/activerecord/lib/active_record/locking/optimistic.rb b/activerecord/lib/active_record/locking/optimistic.rb index e643c0d437..4d73cdd37a 100644 --- a/activerecord/lib/active_record/locking/optimistic.rb +++ b/activerecord/lib/active_record/locking/optimistic.rb @@ -40,11 +40,13 @@ module ActiveRecord      # 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>. -    # To override the name of the +lock_version+ column, invoke the <tt>set_locking_column</tt> method. -    # This method uses the same syntax as <tt>set_table_name</tt> +    # To override the name of the +lock_version+ column, set the <tt>locking_column</tt> class attribute: +    # +    #   class Person < ActiveRecord::Base +    #     self.locking_column = :lock_person +    #   end +    #      module Optimistic        extend ActiveSupport::Concern  | 
