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

Fixes Issue #13466. #14544

Merged
merged 1 commit into from May 21, 2014

Conversation

Projects
None yet
5 participants
@jefflai2
Contributor

jefflai2 commented Mar 31, 2014

Changed the call to a scope block to be evaluated with instance_eval.
The result is that ScopeRegistry can use the actual class instead of base_class when
caching scopes so queries made by classes with a common ancestor won't leak scopes.

@jefflai2

This comment has been minimized.

Show comment
Hide comment
@jefflai2

jefflai2 Mar 31, 2014

Contributor

@tenderlove Created new PR to reference a dedicated target branch

Contributor

jefflai2 commented Mar 31, 2014

@tenderlove Created new PR to reference a dedicated target branch

@robin850 robin850 referenced this pull request Apr 1, 2014

Closed

Fixes Issue #13466. #14492

@matthewd

This comment has been minimized.

Show comment
Hide comment
@matthewd

matthewd Apr 4, 2014

Member

This relates back to friends-of-rails#4

Member

matthewd commented Apr 4, 2014

This relates back to friends-of-rails#4

@robin850 robin850 added this to the 4.0.6 milestone Apr 6, 2014

Fixes Issue #13466.
Changed the call to a scope block to be evaluated with instance_eval.
The result is that ScopeRegistry can use the actual class instead of base_class when
caching scopes so queries made by classes with a common ancestor won't leak scopes.

@rafaelfranca rafaelfranca modified the milestones: 4.0.6, 4.0.7 May 21, 2014

@rafaelfranca rafaelfranca merged commit 9c3afdc into rails:master May 21, 2014

rafaelfranca added a commit that referenced this pull request May 21, 2014

Merge pull request #14544 from jefflai2/named_scope_sti
Fixes Issue #13466.

Conflicts:
	activerecord/CHANGELOG.md

rafaelfranca added a commit that referenced this pull request May 21, 2014

Merge pull request #14544 from jefflai2/named_scope_sti
Fixes Issue #13466.

Conflicts:
	activerecord/CHANGELOG.md

Conflicts:
	activerecord/CHANGELOG.md

rafaelfranca added a commit that referenced this pull request May 21, 2014

Merge pull request #14544 from jefflai2/named_scope_sti
Fixes Issue #13466.

Conflicts:
	activerecord/CHANGELOG.md

Conflicts:
	activerecord/CHANGELOG.md
	activerecord/lib/active_record/scoping/named.rb
@rafaelfranca

This comment has been minimized.

Show comment
Hide comment
@rafaelfranca

rafaelfranca May 21, 2014

Member

I'm reverting this change since it doesn't play nice with activerecord-deprecated_finders. See https://travis-ci.org/rails/rails/builds/25654074

Member

rafaelfranca commented May 21, 2014

I'm reverting this change since it doesn't play nice with activerecord-deprecated_finders. See https://travis-ci.org/rails/rails/builds/25654074

rafaelfranca added a commit that referenced this pull request May 21, 2014

Revert "Merge pull request #14544 from jefflai2/named_scope_sti"
This reverts commit 807ee0a.

Conflicts:
	activerecord/test/models/comment.rb

This change break integration with activerecord-deprecated_finders so
I'm reverting until we find a way to make it work with this gem.

rafaelfranca added a commit that referenced this pull request May 21, 2014

Revert "Merge pull request #14544 from jefflai2/named_scope_sti"
This reverts commit eed1e25.

Conflicts:
	activerecord/CHANGELOG.md
	activerecord/test/models/comment.rb

This change break integration with activerecord-deprecated_finders so
I'm reverting until we find a way to make it work with this gem.

rafaelfranca added a commit that referenced this pull request May 21, 2014

Revert "Merge pull request #14544 from jefflai2/named_scope_sti"
This reverts commit 9a1abed, reversing
changes made to c72d6c9.

Conflicts:
	activerecord/CHANGELOG.md
	activerecord/test/models/comment.rb

This change break integration with activerecord-deprecated_finders so
I'm reverting until we find a way to make it work with this gem.

@jefflai2 jefflai2 referenced this pull request May 26, 2014

Closed

Updated Named Scope STI #15329

jefflai2 added a commit to jefflai2/rails that referenced this pull request May 26, 2014

Merge pull request rails#14544 from jefflai2/named_scope_sti
Fixes Issue rails#13466.

Conflicts:
	activerecord/CHANGELOG.md

Conflicts:
	activerecord/CHANGELOG.md

jefflai2 added a commit to jefflai2/rails that referenced this pull request May 26, 2014

Updated rails#14544 to work with `activerecord-deprecated_finders`
Simply used older style of lambda definitions within a test.
Fixes Issue rails#13466. See rails#14544 for complete description.

jefflai2 added a commit to jefflai2/rails that referenced this pull request Jun 10, 2014

Updated rails#14544 to work with `activerecord-deprecated_finders`
Used older style of lambda definitions within a test. Also explicitly check for
the case when `activerecord-deprecated_finders` is active in the context of scopes
and handles this case specially. This handling relies on and is meant to be used
in unison with rails/activerecord-deprecated_finders#23.

Fixes Issue rails#13466. See rails#14544 for complete description.

@exAspArk exAspArk referenced this pull request Oct 1, 2014

Closed

Wrong default_scope #17130

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