aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/locking/pessimistic.rb
Commit message (Collapse)AuthorAgeFilesLines
* Fix example for database-specific locking clauseGannon McGibbon2018-10-301-3/+3
| | | | [ci skip]
* Merge pull request #30956 from CJStadler/with-lock-changed-deprecationRafael França2018-03-281-1/+1
| | | | Fix deprecation warnings from with_lock
* Rase when calling `lock!` in a dirty recordRafael Mendonça França2017-10-231-4/+5
|
* Update links to use https instead of http [ci skip]Yoshiyuki Hirano2017-08-221-1/+1
|
* Change http postgresql.org links to https [ci skip]yuuji.yaginuma2017-07-301-1/+1
| | | | | It seems that it accepts only HTTPS connections. Ref: https://github.com/postgres/postgres/commit/7f77cbd996855a06fb742ea11adbe55c42b48fe2
* Use frozen-string-literal in ActiveRecordKir Shatrov2017-07-191-0/+2
|
* Revert "Merge pull request #29540 from kirs/rubocop-frozen-string"Matthew Draper2017-07-021-1/+0
| | | | | This reverts commit 3420a14590c0e6915d8b6c242887f74adb4120f9, reversing changes made to afb66a5a598ce4ac74ad84b125a5abf046dcf5aa.
* Enforce frozen string in RubocopKir Shatrov2017-07-011-0/+1
|
* Deprecate locking of dirty recordsMarc Schütz2017-02-071-1/+10
|
* modernizes hash syntax in activerecordXavier Noria2016-08-061-1/+1
|
* Updated MySQL documentation link to MySQL latest version 5.7 everywhere [ci ↵amitkumarsuroliya2015-09-101-1/+1
| | | | | skip] Bumps from `5.6` to `5.7`
* Update old link in pessimistic.rb commentsAlexander Leishman2015-03-181-1/+1
| | | Update link in comments to point to latest MySQL production version documentation. See here for reference: http://dev.mysql.com/doc/refman/5.0/en/choosing-version.html
* [ci skip] avoid deprecation warning in sample codesue4452013-10-181-3/+3
| | | | | Account.find(1, lock: true) -> DEPRECATION WARNING: Passing options to #find is deprecated. Please build a scope and then call #find on it.
* Fix word order in documentation for with_lockPedro Fayolle2013-05-301-1/+1
|
* remove meaningless use of Relation#allAkira Matsuda2013-01-031-1/+1
| | | | particularly, `all(options)` would warn
* 1.9 Syntax related changesAvnerCohen2012-11-101-3/+3
|
* Add ActiveRecord::Base#with_lockOlek Janiszewski2012-01-181-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add a `with_lock` method to ActiveRecord objects, which starts a transaction, locks the object (pessimistically) and yields to the block. The method takes one (optional) parameter and passes it to `lock!`. Before: class Order < ActiveRecord::Base def cancel! transaction do lock! # ... cancelling logic end end end After: class Order < ActiveRecord::Base def cancel! with_lock do # ... cancelling logic end end end
* Closes GH #1032John Paul Ashenfelter2011-05-191-1/+1
| | | | Fixed what looks like minor cut/paste error in documentation for ActiveRecord::Locking:Pessimistic
* Better doc styling in ActiveRecord::LockingSebastian Martinez2011-05-171-2/+2
|
* remove some blanksPaco Guzman2011-03-111-3/+3
|
* fixed broken link to postgresql docsSergii Boiko2011-02-151-1/+1
| | | | Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* use persisted? instead of new_record? wherever possibleDavid Chelimsky2010-11-091-1/+1
| | | | | | | | | | | - persisted? is the API defined in ActiveModel - makes it easier for extension libraries to conform to ActiveModel APIs without concern for whether the extended object is specifically ActiveRecord [#5927 state:committed] Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* Use new finders syntax in docs.Emilio Tagua2010-09-011-3/+3
|
* Removed the copyright notice not to show it in the result of 'ri ActiveRecord'.Shugo Maeda2009-09-111-22/+0
|
* Improve documentation coverage and markupXavier Noria2008-05-021-2/+2
| | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Backed out of new_record? to new? transformation as it would screw up ↵David Heinemeier Hansson2006-09-051-1/+1
| | | | | | existing models that did boolean calls on "new" attributes [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5018 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Deprecated ActiveRecord::Base.new_record? in favor of ↵David Heinemeier Hansson2006-09-051-1/+1
| | | | | | ActiveRecord::Base.new? (old version still works until Rails 2.0) [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5017 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* r4664@asus: jeremy | 2006-06-19 18:55:36 -0700Jeremy Kemper2006-06-201-0/+77
Use the #lock method to obtain a row lock on a single record. Simply reloads the record with :lock => true. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4462 5ecf4fe2-1ee6-0310-87b1-e25e094e27de