{"action":"created","issue":{"url":"https://api.github.com/repos/collectiveidea/audited/issues/243","labels_url":"https://api.github.com/repos/collectiveidea/audited/issues/243/labels{/name}","comments_url":"https://api.github.com/repos/collectiveidea/audited/issues/243/comments","events_url":"https://api.github.com/repos/collectiveidea/audited/issues/243/events","html_url":"https://github.com/collectiveidea/audited/pull/243","id":118912724,"number":243,"title":"Remove audit#version","user":{"login":"jkronz","id":634837,"avatar_url":"https://avatars.githubusercontent.com/u/634837?v=3","gravatar_id":"","url":"https://api.github.com/users/jkronz","html_url":"https://github.com/jkronz","followers_url":"https://api.github.com/users/jkronz/followers","following_url":"https://api.github.com/users/jkronz/following{/other_user}","gists_url":"https://api.github.com/users/jkronz/gists{/gist_id}","starred_url":"https://api.github.com/users/jkronz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jkronz/subscriptions","organizations_url":"https://api.github.com/users/jkronz/orgs","repos_url":"https://api.github.com/users/jkronz/repos","events_url":"https://api.github.com/users/jkronz/events{/privacy}","received_events_url":"https://api.github.com/users/jkronz/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-11-25T20:00:26Z","updated_at":"2015-11-25T20:31:04Z","closed_at":"2015-11-25T20:29:50Z","pull_request":{"url":"https://api.github.com/repos/collectiveidea/audited/pulls/243","html_url":"https://github.com/collectiveidea/audited/pull/243","diff_url":"https://github.com/collectiveidea/audited/pull/243.diff","patch_url":"https://github.com/collectiveidea/audited/pull/243.patch"},"body":"- remove calls to set the version number\r\n- update scopes that rely on version number to find ancestor versions.\r\n\r\nThese changes only remove one feature that was supported by the parent gem: calling `obj.revision(:previous)` repeatedly. So recursing previous versions to find a change wont work anymore.  \r\n\r\n```\r\nwhile(some_revision_im_looking_for) do\r\n  version = obj.revision(:previous)\r\nend\r\n``` \r\n\r\nwill instead have to loop and check the revision index specifically:\r\n\r\n```\r\nrevision_num = obj.audits.count\r\nwhile(some_cond) do\r\n  revision_num -= 1\r\n  version = object.revision(revision_num)\r\nend\r\n```\r\n\r\nI haven't tested this in our app yet, just removing the version column here and making the specs pass again. "},"comment":{"url":"https://api.github.com/repos/collectiveidea/audited/issues/comments/159724187","html_url":"https://github.com/collectiveidea/audited/pull/243#issuecomment-159724187","issue_url":"https://api.github.com/repos/collectiveidea/audited/issues/243","id":159724187,"user":{"login":"jkronz","id":634837,"avatar_url":"https://avatars.githubusercontent.com/u/634837?v=3","gravatar_id":"","url":"https://api.github.com/users/jkronz","html_url":"https://github.com/jkronz","followers_url":"https://api.github.com/users/jkronz/followers","following_url":"https://api.github.com/users/jkronz/following{/other_user}","gists_url":"https://api.github.com/users/jkronz/gists{/gist_id}","starred_url":"https://api.github.com/users/jkronz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jkronz/subscriptions","organizations_url":"https://api.github.com/users/jkronz/orgs","repos_url":"https://api.github.com/users/jkronz/repos","events_url":"https://api.github.com/users/jkronz/events{/privacy}","received_events_url":"https://api.github.com/users/jkronz/received_events","type":"User","site_admin":false},"created_at":"2015-11-25T20:31:04Z","updated_at":"2015-11-25T20:31:04Z","body":"sorry, made this request to the wrong fork. :cold_sweat: "}}