Fix regression #6558

Merged
merged 1 commit into from May 31, 2012

7 participants

@parndt

This reverts commit ebfa58a.

This change caused a regression in my application's tests:

Broken tests pass after this change is reverted.

@parndt parndt Revert "Removes unneeded caching from ActiveRecord::Base.relation"
This reverts commit ebfa58a.

This change caused a regression in my application's tests:

* Failing build http://travis-ci.org/#!/resolve/refinerycms/builds/1461242

Broken tests pass after this change is reverted.
4ce7f98
@tenderlove tenderlove merged commit 4c8805d into rails:3-2-stable May 31, 2012
@tenderlove tenderlove added a commit that referenced this pull request May 31, 2012
@tenderlove tenderlove Merge branch '3-2-rel' into 3-2-stable
* 3-2-rel:
  bumping to 3.2.4
  adding security notifications to CHANGELOGs
  updating changelogs
  Merge pull request #6558 from parndt/fix_regression
4df9680
@tgildea

This appears to break ActiveRecord::Base#first and #last.
It looks like 13f1401 also needs to be reverted.

To reproduce the bug:

Post.first #=> nil
post = Post.create(:name => "test")
Post.first #=> post
post.destroy
Post.first #=> post

The last Post.first should not be returning the destroyed record.

@ktheory

+1 to @tgildea. This commit breaks Model.last in our app's test suite. (by git-bisecting from v3.2.3 to v3.2.4)

@radar

This causes Spree's API component to break also. Also found by git-bisecting just like @ktheory.

@sferik

Same here. This patch is causing failures in rubygems.org. Reverting this commit fixes the problem.

@jonleighton
Ruby on Rails member

@parndt can you explain more about the issue you encountered? I would like to add a test to prevent this regression re-occurring in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment