{"action":"created","issue":{"url":"https://api.github.com/repos/rails/rails/issues/18135","labels_url":"https://api.github.com/repos/rails/rails/issues/18135/labels{/name}","comments_url":"https://api.github.com/repos/rails/rails/issues/18135/comments","events_url":"https://api.github.com/repos/rails/rails/issues/18135/events","html_url":"https://github.com/rails/rails/issues/18135","id":52637573,"number":18135,"title":"ActiveRecord 4.2.0 : update_attributes! raises StaleObjectError","user":{"login":"ThomasSevestre","id":1258170,"avatar_url":"https://avatars.githubusercontent.com/u/1258170?v=3","gravatar_id":"","url":"https://api.github.com/users/ThomasSevestre","html_url":"https://github.com/ThomasSevestre","followers_url":"https://api.github.com/users/ThomasSevestre/followers","following_url":"https://api.github.com/users/ThomasSevestre/following{/other_user}","gists_url":"https://api.github.com/users/ThomasSevestre/gists{/gist_id}","starred_url":"https://api.github.com/users/ThomasSevestre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ThomasSevestre/subscriptions","organizations_url":"https://api.github.com/users/ThomasSevestre/orgs","repos_url":"https://api.github.com/users/ThomasSevestre/repos","events_url":"https://api.github.com/users/ThomasSevestre/events{/privacy}","received_events_url":"https://api.github.com/users/ThomasSevestre/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2014-12-22T10:35:44Z","updated_at":"2015-01-09T13:07:36Z","closed_at":"2014-12-22T14:33:33Z","body":"Say I have this migration\r\n\r\n    create_table :my_objects do |t|\r\n      t.integer :some_key\r\n      t.integer :lock_version\r\n    end\r\n\r\nThis code doesn't work as expected:\r\n\r\n    MyObject.create!(some_key: 1)\r\n    o= MyObject.first\r\n    o.update_attributes!(some_key: 2)\r\n\r\nIt raises this error:\r\n\r\n    ActiveRecord::StaleObjectError: Attempted to update a stale object: MyObject"},"comment":{"url":"https://api.github.com/repos/rails/rails/issues/comments/69331856","html_url":"https://github.com/rails/rails/issues/18135#issuecomment-69331856","issue_url":"https://api.github.com/repos/rails/rails/issues/18135","id":69331856,"user":{"login":"sgrif","id":1529387,"avatar_url":"https://avatars.githubusercontent.com/u/1529387?v=3","gravatar_id":"","url":"https://api.github.com/users/sgrif","html_url":"https://github.com/sgrif","followers_url":"https://api.github.com/users/sgrif/followers","following_url":"https://api.github.com/users/sgrif/following{/other_user}","gists_url":"https://api.github.com/users/sgrif/gists{/gist_id}","starred_url":"https://api.github.com/users/sgrif/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sgrif/subscriptions","organizations_url":"https://api.github.com/users/sgrif/orgs","repos_url":"https://api.github.com/users/sgrif/repos","events_url":"https://api.github.com/users/sgrif/events{/privacy}","received_events_url":"https://api.github.com/users/sgrif/received_events","type":"User","site_admin":false},"created_at":"2015-01-09T13:07:36Z","updated_at":"2015-01-09T13:07:36Z","body":"@dspaeth-faber please provide a reproduction script using the template I linked to above, and open a new issue"}}