From 0a51e43866e54c5445a8efce253d60df23e3a7d6 Mon Sep 17 00:00:00 2001 From: Paco Guzman Date: Fri, 11 Mar 2011 23:08:55 +0100 Subject: remove some blanks --- activerecord/lib/active_record/locking/pessimistic.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'activerecord/lib/active_record/locking/pessimistic.rb') diff --git a/activerecord/lib/active_record/locking/pessimistic.rb b/activerecord/lib/active_record/locking/pessimistic.rb index 557b277d6b..862cf8f72a 100644 --- a/activerecord/lib/active_record/locking/pessimistic.rb +++ b/activerecord/lib/active_record/locking/pessimistic.rb @@ -9,9 +9,8 @@ module ActiveRecord # Account.find(1, :lock => true) # # Pass :lock => 'some locking clause' to give a database-specific locking clause - # of your own such as 'LOCK IN SHARE MODE' or 'FOR UPDATE NOWAIT'. + # of your own such as 'LOCK IN SHARE MODE' or 'FOR UPDATE NOWAIT'. Example: # - # Example: # Account.transaction do # # select * from accounts where name = 'shugo' limit 1 for update # shugo = Account.where("name = 'shugo'").lock(true).first @@ -24,6 +23,7 @@ module ActiveRecord # # You can also use ActiveRecord::Base#lock! method to lock one record by id. # This may be better if you don't need to lock every row. Example: + # # Account.transaction do # # select * from accounts where ... # accounts = Account.where(...).all @@ -44,7 +44,7 @@ module ActiveRecord module Pessimistic # Obtain a row lock on this record. Reloads the record to obtain the requested # lock. Pass an SQL locking clause to append the end of the SELECT statement - # or pass true for "FOR UPDATE" (the default, an exclusive row lock). Returns + # or pass true for "FOR UPDATE" (the default, an exclusive row lock). Returns # the locked record. def lock!(lock = true) reload(:lock => lock) if persisted? -- cgit v1.2.3