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

Deprecate the delegation of Array bang methods in ActiveRecord::Delegation #12129

Merged
merged 2 commits into from Sep 13, 2013

Commits on Sep 4, 2013

  1. Configuration menu
    Copy the full SHA
    5e41cb4 View commit details
    Browse the repository at this point in the history
  2. Deprecate the delegation of Array bang methods in ActiveRecord::Deleg…

    …ation
    
    The primary means of returning results for Array bang methods is to modify
    the array in-place. When you call these methods on a relation, that
    array is created, modified, and then thrown away. Only the secondary
    return value is exposed to the caller.
    
    Removing this delegation is a straight-forward way to reduce user error
    by forcing callers to first explicitly call #to_a in order to expose
    the array to be acted on by the bang method.
    Empact committed Sep 4, 2013
    1 Configuration menu
    Copy the full SHA
    1a40be0 View commit details
    Browse the repository at this point in the history