Create a blacklist to disallow mutator methods to be delegated to Array#13314
Merged
jeremy merged 1 commit intorails:masterfrom Dec 17, 2013
laurocaetano:blacklist_array_methods
Merged
Create a blacklist to disallow mutator methods to be delegated to Array#13314jeremy merged 1 commit intorails:masterfrom laurocaetano:blacklist_array_methods
jeremy merged 1 commit intorails:masterfrom
laurocaetano:blacklist_array_methods
Conversation
Member
There was a problem hiding this comment.
def array_delegable?(method)
Array.method_defined?(method) && BLACKLISTED_ARRAY_METHODS.exclude?(method)
end
Member
|
Please rebase ❤️ |
Contributor
Author
|
rebased 💚 |
…ray`. This change was necessary because the whitelist wouldn't work. It would be painful for users trying to update their applications. This blacklist intent to prevent odd bugs and confusion in code that call mutator methods directely on the `Relation`.
jeremy
added a commit
that referenced
this pull request
Dec 17, 2013
Create a blacklist to disallow mutator methods to be delegated to Array Conflicts: guides/source/upgrading_ruby_on_rails.md
Contributor
Author
|
💚 ❤️ 💙 💛 |
senny
added a commit
that referenced
this pull request
Jan 27, 2014
oliverguenther
added a commit
to oliverguenther/openproject
that referenced
this pull request
Aug 10, 2015
rails/rails#13314 removed mutator methods (e.g., `Array#sort!`) from relations. This commit enforces returned work packages to be ordered by ID instead.
oliverguenther
added a commit
to oliverguenther/openproject
that referenced
this pull request
Aug 11, 2015
rails/rails#13314 removed mutator methods (e.g., `Array#sort!`) from relations. This commit enforces either an ordering on the query itself where applicable, or uses a non-mutator sort.
myabc
pushed a commit
to myabc/openproject
that referenced
this pull request
Aug 19, 2015
rails/rails#13314 removed mutator methods (e.g., `Array#sort!`) from relations. This commit enforces either an ordering on the query itself where applicable, or uses a non-mutator sort.
myabc
added a commit
to eurucamp/eurucamp-activities
that referenced
this pull request
Mar 11, 2017
rails/rails#13314 removed mutator methods (e.g., `Array#sort!`) from relations.
myabc
added a commit
to eurucamp/eurucamp-activities
that referenced
this pull request
Apr 10, 2018
rails/rails#13314 removed mutator methods (e.g., `Array#sort!`) from relations.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This change was necessary because the whitelist wouldn't work.
It would be painful for users trying to update their applications.
Related with: #12129