Daniel Morrison
3610997ba3
Partial updates don't update lock_version if nothing changed. [ #426 state:resolved]
2008-06-22 20:33:43 -07:00
Pratik Naik
98dc582742
Merge docrails.
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-05-25 12:29:00 +01:00
Xavier Noria
64092de257
Improve documentation coverage and markup
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-05-02 14:45:23 +01:00
David Heinemeier Hansson
c353794dff
Fixed that pessimistic locking you reference the quoted table name (Josh Susser) [ #67 state:resolved]
2008-04-30 15:04:08 -05:00
Jeremy Kemper
6b9448cdd2
Partial updates include only unsaved attributes. Off by default; set YourClass.partial_updates = true to enable.
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9157 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-31 01:10:04 +00:00
Rick Olson
ce102e3af9
Ensure optimistic locking handles nil #lock_version values properly. Closes #10510 [rick]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8395 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-15 01:45:30 +00:00
Jeremy Kemper
473202df83
attr_readonly behaves well with optimistic locking. Closes #10188 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8156 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-11-16 20:31:24 +00:00
Jeremy Kemper
c4a31560bd
Optimistic locking: revert the lock version when an update fails. Closes #7840 . Also return the number of affected rows instead of true.
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6843 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-05-25 21:31:44 +00:00
Marcel Molina
194b4aa4f3
Provide brief introduction to what optimistic locking is. Closes #8097 . [fearoffish]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6682 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-05-06 05:01:31 +00:00
Jeremy Kemper
07d8f46b85
Consistent public/protected/private visibility for chained methods. Closes #7813 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6396 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-03-13 02:14:31 +00:00
Jamis Buck
83752373b9
Made increment_counter/decrement_counter play nicely with optimistic locking, and added a more general update_counters method
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6139 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-02-07 16:10:40 +00:00
Rick Olson
1a11bffde1
Don't create instance writer methods for class attributes. Closes #7401 [Rick]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6051 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-01-28 01:31:31 +00:00
David Heinemeier Hansson
85fbb22f07
Backed out of new_record? to new? transformation as it would screw up 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
2006-09-05 18:54:24 +00:00
David Heinemeier Hansson
9d7e6432b2
Deprecated ActiveRecord::Base.new_record? in favor of 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
2006-09-05 18:48:10 +00:00
Michael Koziarski
b445ab986a
Rename quote to quote_value so the name can be used in AR models. #3628 [Koz]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5007 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-09-04 23:41:13 +00:00
Jeremy Kemper
528618a910
Optimistic locking: gracefully handle nil versions, treat as zero. Closes #5908 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4958 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-09-04 00:02:38 +00:00
Jeremy Kemper
722e0b6a8b
r4664@asus: jeremy | 2006-06-19 18:55:36 -0700
...
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
2006-06-20 01:58:36 +00:00