Fix find_in_batches with customized primary_key on 3-2-stable #7987

Merged
merged 3 commits into from Nov 8, 2012

Conversation

Projects
None yet
4 participants

Back port @spastorino fix (#7652) from rails4 into 3.2.

I also noticed that find_in_batches is broken with string IDs when start option is not provided, but it works perfectly when start has been given. I fixed it with a test case in commit 827942195cdf4c6f09f540b60ee7c1b7a0d051b6. Maybe I went too far with that last commit?

Owner

spastorino commented Oct 20, 2012

@steveklabnik I was talking about this commit alexisbernard/rails@8279421

Member

steveklabnik commented Oct 20, 2012

Ahh, sorry! Since it was a general comment, I got confused.

Owner

spastorino commented Oct 20, 2012

Wasn't a general comment ;), I did that comment on the commit, unsure why github shows it that way ;)

Member

steveklabnik commented Oct 20, 2012

No worries! ❤️ I'll just STFU now. :D

Owner

spastorino commented Oct 20, 2012

❤️ ❤️ ❤️

spastorino and others added some commits Sep 21, 2012

start could be a string
Related to 761bc75 and
eb876c4

Conflicts:

	activerecord/lib/active_record/relation/batches.rb
	activerecord/test/cases/batches_test.rb
Fix find_in_batches against string IDs when start option is not speci…
…fied.

Conflicts:

	activerecord/CHANGELOG.md
	activerecord/lib/active_record/relation/batches.rb

I backported fix #8073 from master to 3.2 as you asked me there alexisbernard/rails@8279421#commitcomment-2041376.

/cc @spastorino

spastorino added a commit that referenced this pull request Nov 8, 2012

Merge pull request #7987 from alexisbernard/3-2_find_in_batches_compa…
…tible_with_strings

Fix find_in_batches with customized primary_key on 3-2-stable

@spastorino spastorino merged commit 70f384e into rails:3-2-stable Nov 8, 2012

@jassa jassa referenced this pull request in sunspot/sunspot Mar 5, 2013

Merged

Let Rails handle defaults for custom primary keys #373

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