Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Regression 4.0 -> 4.1] Put back Relation#join method as a delegate to Array #14978

Merged
merged 1 commit into from May 5, 2014

Conversation

@bogdan
Copy link
Contributor

bogdan commented May 5, 2014

This is a regression 4.0 -> 4.1 fix.
In 4.1.0 Relation#join is delegated to Arel::SelectManager.
In 4.0 series it is delegated to Array#join

This patch puts back the behaviour of 4.0

@rafaelfranca

This comment has been minimized.

Copy link
Member

rafaelfranca commented May 5, 2014

Do you know which commit changed this behavior? This change may be
intentional
On May 5, 2014 4:53 AM, "Bogdan Gusiev" notifications@github.com wrote:

This is a regression 4.0 -> 4.1 fix.
In 4.1.0 Relation#join is delegated to Arel::SelectManager.
In 4.0 series it is delegated to Array#join

This patch puts back the behaviour of 4.0

You can merge this Pull Request by running

git pull https://github.com/bogdan/rails relation-join

Or view, comment on, or merge it at:

#14978
Commit Summary

  • Put back Relation#join method as a delegate to Array

File Changes

  • M activerecord/lib/active_record/relation/delegation.rbhttps://github.com//pull/14978/files#diff-0(2)
  • M activerecord/test/cases/relation/delegation_test.rbhttps://github.com//pull/14978/files#diff-1(2)
  • M activerecord/test/cases/relations_test.rbhttps://github.com//pull/14978/files#diff-2(4)
  • M activerecord/test/models/comment.rbhttps://github.com//pull/14978/files#diff-3(4)

Patch Links:


Reply to this email directly or view it on GitHubhttps://github.com//pull/14978
.

@bogdan

This comment has been minimized.

Copy link
Contributor Author

bogdan commented May 5, 2014

Well, it had to be noted in upgrade guide. Also, I think we should make more smooth migration for people. Like a deprecation warning. I can't believe such changes are done without easier way to migrate.

@rafaelfranca

This comment has been minimized.

Copy link
Member

rafaelfranca commented May 5, 2014

There is a easy way to migrate. Call to_a before calling join. It does make
sense to join behaves like it is doing now. Not saying that this was the
case but is better check before reverting.
On May 5, 2014 9:47 AM, "Bogdan Gusiev" notifications@github.com wrote:

Well, it had to be noted in upgrade guide. Also, I think we should make
more smooth migration for people. Like a deprecation warning. I can't
believe such changes are done without easier way to migrate.


Reply to this email directly or view it on GitHubhttps://github.com//pull/14978#issuecomment-42183814
.

@bogdan

This comment has been minimized.

Copy link
Contributor Author

bogdan commented May 5, 2014

Commit introduced the change: aa85bdb

@rafaelfranca

This comment has been minimized.

Copy link
Member

rafaelfranca commented May 5, 2014

Great! So it was not intentional. Thank you for the investigation and the patch.

@rafaelfranca

This comment has been minimized.

Copy link
Member

rafaelfranca commented May 5, 2014

Mind to add a CHANGELOG entry?

This is a regression 4.0 -> 4.1 fix.
In 4.1.0 Relation#join is delegated to Arel#SelectManager.
In 4.0 series it is delegated to Array#join

This patch puts back the behaviour of 4.0
@bogdan

This comment has been minimized.

Copy link
Contributor Author

bogdan commented May 5, 2014

done

rafaelfranca added a commit that referenced this pull request May 5, 2014
[Regression 4.0 -> 4.1] Put back Relation#join method as a delegate to Array
@rafaelfranca rafaelfranca merged commit 7e20bdc into rails:master May 5, 2014
1 check passed
1 check passed
continuous-integration/travis-ci The Travis CI build passed
Details
rafaelfranca added a commit that referenced this pull request May 5, 2014
[Regression 4.0 -> 4.1] Put back Relation#join method as a delegate to Array
@bogdan

This comment has been minimized.

Copy link
Contributor Author

bogdan commented May 6, 2014

When can we expect 4.1.1 release approximately?

@bogdan bogdan deleted the bogdan:relation-join branch May 6, 2014
@rafaelfranca

This comment has been minimized.

Copy link
Member

rafaelfranca commented May 6, 2014

Soon.
On May 6, 2014 4:04 AM, "Bogdan Gusiev" notifications@github.com wrote:

When can we expect 4.1.1 release approximately?


Reply to this email directly or view it on GitHubhttps://github.com//pull/14978#issuecomment-42272901
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.