This project is archived and is in readonly mode.
Changeset [b06e5dce9786bf69ac5f114286fc9236dc9bfe5c] by Tobias Bielohlawek
February 26th, 2010 @ 10:39 AM
fixed a 'RecordNotFound' bug when calling 'reload' on a object which doesn't met the default_scope conditions, added test [#3166 status:resolved]
The reload method didn't made use of 'with_exclusive_scope' when reloading the object. This lead to a RecordNotFound exception, in case the object doesn't met the default_scope condition (anymore) - which is obviously a bug. This quick fix makes use of with_exclusive_scope in the reload method as well. See test for full example.
Signed-off-by: José Valim jose.valim@gmail.com
http://github.com/rails/rails/commit/b06e5dce9786bf69ac5f114286fc92...
Committed by Tobias Bielohlawek
- M activerecord/lib/active_record/base.rb
- M activerecord/test/cases/base_test.rb
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>