diff options
author | Yves Senn <yves.senn@gmail.com> | 2014-01-29 07:40:52 -0800 |
---|---|---|
committer | Yves Senn <yves.senn@gmail.com> | 2014-01-29 07:40:52 -0800 |
commit | 40e7fe3451df8e5b454f7d0472396d2429edc0e5 (patch) | |
tree | 7f63409243031eaaea72dad8b32ab1f980238a64 /activerecord/lib/active_record/persistence.rb | |
parent | f142527eb30626904cb1e655a1a28801f08b8acf (diff) | |
parent | 66e533f9b13f2ea1f56a19246af55621cc368489 (diff) | |
download | rails-40e7fe3451df8e5b454f7d0472396d2429edc0e5.tar.gz rails-40e7fe3451df8e5b454f7d0472396d2429edc0e5.tar.bz2 rails-40e7fe3451df8e5b454f7d0472396d2429edc0e5.zip |
Merge pull request #13868 from mauricio/bug-13788
Correctly send the string given to lock! and reload(:lock) to the lock scope - fixes #13788
Diffstat (limited to 'activerecord/lib/active_record/persistence.rb')
-rw-r--r-- | activerecord/lib/active_record/persistence.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/persistence.rb b/activerecord/lib/active_record/persistence.rb index 460fbdb3f8..b1b35ed940 100644 --- a/activerecord/lib/active_record/persistence.rb +++ b/activerecord/lib/active_record/persistence.rb @@ -389,7 +389,7 @@ module ActiveRecord fresh_object = if options && options[:lock] - self.class.unscoped { self.class.lock.find(id) } + self.class.unscoped { self.class.lock(options[:lock]).find(id) } else self.class.unscoped { self.class.find(id) } end |