{"action":"created","issue":{"url":"https://api.github.com/repos/paper-trail-gem/paper_trail/issues/1108","repository_url":"https://api.github.com/repos/paper-trail-gem/paper_trail","labels_url":"https://api.github.com/repos/paper-trail-gem/paper_trail/issues/1108/labels{/name}","comments_url":"https://api.github.com/repos/paper-trail-gem/paper_trail/issues/1108/comments","events_url":"https://api.github.com/repos/paper-trail-gem/paper_trail/issues/1108/events","html_url":"https://github.com/paper-trail-gem/paper_trail/pull/1108","id":330093205,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkzMTg2NzQ4","number":1108,"title":"Fix for issue #594, reifying sub-classed models that use STI","user":{"login":"lorint","id":5301131,"node_id":"MDQ6VXNlcjUzMDExMzE=","avatar_url":"https://avatars2.githubusercontent.com/u/5301131?v=4","gravatar_id":"","url":"https://api.github.com/users/lorint","html_url":"https://github.com/lorint","followers_url":"https://api.github.com/users/lorint/followers","following_url":"https://api.github.com/users/lorint/following{/other_user}","gists_url":"https://api.github.com/users/lorint/gists{/gist_id}","starred_url":"https://api.github.com/users/lorint/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lorint/subscriptions","organizations_url":"https://api.github.com/users/lorint/orgs","repos_url":"https://api.github.com/users/lorint/repos","events_url":"https://api.github.com/users/lorint/events{/privacy}","received_events_url":"https://api.github.com/users/lorint/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":20,"created_at":"2018-06-07T02:19:02Z","updated_at":"2018-06-26T21:18:32Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/paper-trail-gem/paper_trail/pulls/1108","html_url":"https://github.com/paper-trail-gem/paper_trail/pull/1108","diff_url":"https://github.com/paper-trail-gem/paper_trail/pull/1108.diff","patch_url":"https://github.com/paper-trail-gem/paper_trail/pull/1108.patch"},"body":"This update provides a fix for [Issue #594](https://github.com/paper-trail-gem/paper_trail/issues/594) -- Reify on associations fails if using Single Table Inheritance.\r\n\r\nIn order to properly reify a version of a model using STI, item_type can refer directly to the class name instead of being base_class. When making this change, the five reifiers in the gem [paper_trail-association_tracking](https://github.com/westonganger/paper_trail-association_tracking) that refer to `base_class` can also be updated, which is covered in [PT-AT PR #5](https://github.com/westonganger/paper_trail-association_tracking/pull/5). With these changes, the previously failing example in person_spec.rb will pass.\r\n\r\nOne key benefit from this change is to allow PT to represent STI model names. So if you have for instance the model \"Person\", there could be subclasses for \"Doctor\" and \"Patient\". The subclassed name gets put into `item_type` so that audit logs can be more clear."},"comment":{"url":"https://api.github.com/repos/paper-trail-gem/paper_trail/issues/comments/400465771","html_url":"https://github.com/paper-trail-gem/paper_trail/pull/1108#issuecomment-400465771","issue_url":"https://api.github.com/repos/paper-trail-gem/paper_trail/issues/1108","id":400465771,"node_id":"MDEyOklzc3VlQ29tbWVudDQwMDQ2NTc3MQ==","user":{"login":"westonganger","id":3414795,"node_id":"MDQ6VXNlcjM0MTQ3OTU=","avatar_url":"https://avatars3.githubusercontent.com/u/3414795?v=4","gravatar_id":"","url":"https://api.github.com/users/westonganger","html_url":"https://github.com/westonganger","followers_url":"https://api.github.com/users/westonganger/followers","following_url":"https://api.github.com/users/westonganger/following{/other_user}","gists_url":"https://api.github.com/users/westonganger/gists{/gist_id}","starred_url":"https://api.github.com/users/westonganger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/westonganger/subscriptions","organizations_url":"https://api.github.com/users/westonganger/orgs","repos_url":"https://api.github.com/users/westonganger/repos","events_url":"https://api.github.com/users/westonganger/events{/privacy}","received_events_url":"https://api.github.com/users/westonganger/received_events","type":"User","site_admin":false},"created_at":"2018-06-26T21:18:32Z","updated_at":"2018-06-26T21:18:32Z","author_association":"CONTRIBUTOR","body":"Is it possible that both approaches could be supported? So by default it would use an extra column. If the extra column is not available in the database then fallback to this PR's approach?"}}
{"actor":{"display_login":"westonganger"}}