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

Remove unnecessary ordinal methods for collection association #26200

Merged

Conversation

kamipo
Copy link
Member

@kamipo kamipo commented Aug 17, 2016

Currently CollectionProxy inherits Relation therefore we can use
its own methods rather than delegating to collection association.

Currently `CollectionProxy` inherits `Relation` therefore we can use
its own methods rather than delegating to collection association.
@rails-bot
Copy link

r? @eileencodes

(@rails-bot has picked a reviewer for you, use r? to override)

@@ -453,6 +409,12 @@ def null_scope?
owner.new_record? && !foreign_key_present?
end

def find_from_target?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did this method become public now? Does it need to be public?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this method is called by collection proxy like null_scope?.
https://github.com/rails/rails/pull/26200/files#diff-bee622c17de67f292adf310f75288e25R1126

@rafaelfranca rafaelfranca merged commit 085166d into rails:master Aug 19, 2016
@kamipo kamipo deleted the remove_unnecessary_ordinal_methods branch August 19, 2016 02:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants