{"action":"created","issue":{"url":"https://api.github.com/repos/bbatsov/rubocop/issues/5592","repository_url":"https://api.github.com/repos/bbatsov/rubocop","labels_url":"https://api.github.com/repos/bbatsov/rubocop/issues/5592/labels{/name}","comments_url":"https://api.github.com/repos/bbatsov/rubocop/issues/5592/comments","events_url":"https://api.github.com/repos/bbatsov/rubocop/issues/5592/events","html_url":"https://github.com/bbatsov/rubocop/pull/5592","id":299598551,"number":5592,"title":"Add `Rails/ActiveRecordAliases` cop.","user":{"login":"elebow","id":7873686,"avatar_url":"https://avatars1.githubusercontent.com/u/7873686?v=4","gravatar_id":"","url":"https://api.github.com/users/elebow","html_url":"https://github.com/elebow","followers_url":"https://api.github.com/users/elebow/followers","following_url":"https://api.github.com/users/elebow/following{/other_user}","gists_url":"https://api.github.com/users/elebow/gists{/gist_id}","starred_url":"https://api.github.com/users/elebow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elebow/subscriptions","organizations_url":"https://api.github.com/users/elebow/orgs","repos_url":"https://api.github.com/users/elebow/repos","events_url":"https://api.github.com/users/elebow/events{/privacy}","received_events_url":"https://api.github.com/users/elebow/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-02-23T04:53:28Z","updated_at":"2018-03-03T16:34:46Z","closed_at":"2018-03-03T16:34:25Z","author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/bbatsov/rubocop/pulls/5592","html_url":"https://github.com/bbatsov/rubocop/pull/5592","diff_url":"https://github.com/bbatsov/rubocop/pull/5592.diff","patch_url":"https://github.com/bbatsov/rubocop/pull/5592.patch"},"body":"This finds usage of `update_attributes`/`!`, which is an alias for `update`/`!`. The unaliased names should be preferred for clarity, and the aliases will be deprecated in Rails 6.0 (https://github.com/rails/rails/commit/5645149d3a27054450bd1130ff5715504638a5f5).\r\n\r\n```ruby\r\n#bad\r\nBook.update_attributes!(author: 'Alice')\r\n\r\n#good\r\nBook.update!(author: 'Alice')\r\n```\r\n\r\n-----------------\r\n\r\n* [x] Wrote [good commit messages][1].\r\n* [x] Commit message starts with `[Fix #issue-number]` (if the related issue exists).\r\n* [x] Feature branch is up-to-date with `master` (if not - rebase it).\r\n* [x] Squashed related commits together.\r\n* [x] Added tests.\r\n* [x] Added an entry to the [Changelog](../blob/master/CHANGELOG.md) if the new code introduces user-observable changes. See [changelog entry format](../blob/master/CONTRIBUTING.md#changelog-entry-format).\r\n* [x] The PR relates to *only* one subject with a clear title\r\n  and description in grammatically correct, complete sentences.\r\n* [x] Run `rake default` or `rake parallel`. It executes all tests and RuboCop for itself, and generates the documentation.\r\n\r\n[1]: http://chris.beams.io/posts/git-commit/"},"comment":{"url":"https://api.github.com/repos/bbatsov/rubocop/issues/comments/370160918","html_url":"https://github.com/bbatsov/rubocop/pull/5592#issuecomment-370160918","issue_url":"https://api.github.com/repos/bbatsov/rubocop/issues/5592","id":370160918,"user":{"login":"bbatsov","id":103882,"avatar_url":"https://avatars0.githubusercontent.com/u/103882?v=4","gravatar_id":"","url":"https://api.github.com/users/bbatsov","html_url":"https://github.com/bbatsov","followers_url":"https://api.github.com/users/bbatsov/followers","following_url":"https://api.github.com/users/bbatsov/following{/other_user}","gists_url":"https://api.github.com/users/bbatsov/gists{/gist_id}","starred_url":"https://api.github.com/users/bbatsov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bbatsov/subscriptions","organizations_url":"https://api.github.com/users/bbatsov/orgs","repos_url":"https://api.github.com/users/bbatsov/repos","events_url":"https://api.github.com/users/bbatsov/events{/privacy}","received_events_url":"https://api.github.com/users/bbatsov/received_events","type":"User","site_admin":false},"created_at":"2018-03-03T16:34:46Z","updated_at":"2018-03-03T16:34:46Z","author_association":"OWNER","body":"Thanks for working on this! I really appreciate it! 🙇"}}
{"actor":{"display_login":"bbatsov"}}