GitHub PullRequestEvent at 2014-09-29 07:36:54
Repository: paper_trail
Actor: vinh0604
Payload: {"action":"opened","number":427,"pull_request":{"url":"https://api.github.com/repos/airblade/paper_trail/pulls/427","id":21917552,"html_url":"https://github.com/airblade/paper_trail/pull/427","diff_url":"https://github.com/airblade/paper_trail/pull/427.diff","patch_url":"https://github.com/airblade/paper_trail/pull/427.patch","issue_url":"https://api.github.com/repos/airblade/paper_trail/issues/427","number":427,"state":"open","locked":false,"title":"Fix reify method","user":{"login":"vinh0604","id":886778,"avatar_url":"https://avatars.githubusercontent.com/u/886778?v=2","gravatar_id":"","url":"https://api.github.com/users/vinh0604","html_url":"https://github.com/vinh0604","followers_url":"https://api.github.com/users/vinh0604/followers","following_url":"https://api.github.com/users/vinh0604/following{/other_user}","gists_url":"https://api.github.com/users/vinh0604/gists{/gist_id}","starred_url":"https://api.github.com/users/vinh0604/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vinh0604/subscriptions","organizations_url":"https://api.github.com/users/vinh0604/orgs","repos_url":"https://api.github.com/users/vinh0604/repos","events_url":"https://api.github.com/users/vinh0604/events{/privacy}","received_events_url":"https://api.github.com/users/vinh0604/received_events","type":"User","site_admin":false},"body":"When I drop a column in the model, i.e. `address` add replace it with the a association named `address`, I got the following exception:\r\n\r\n```\r\nActiveModel::MissingAttributeError: can't write unknown attribute `address'\r\n  from .../vendor/bundle/ruby/2.1.0/gems/activerecord-4.0.9/lib/active_record/attribute_methods/write.rb:47:in `write_attribute'\r\n  from .../vendor/bundle/ruby/2.1.0/gems/activerecord-4.0.9/lib/active_record/attribute_methods/dirty.rb:70:in `write_attribute'\r\n  from .../vendor/bundle/ruby/2.1.0/gems/enumerize-0.8.0/lib/enumerize/activerecord.rb:51:in `write_attribute'\r\n  from .../vendor/bundle/ruby/2.1.0/gems/activerecord-4.0.9/lib/active_record/attribute_methods.rb:359:in `[]='\r\n  from .../vendor/bundle/ruby/2.1.0/gems/paper_trail-3.0.5/lib/paper_trail/version_concern.rb:152:in `block (2 levels) in reify'\r\n  from .../vendor/bundle/ruby/2.1.0/gems/paper_trail-3.0.5/lib/paper_trail/version_concern.rb:150:in `each'\r\n  from .../vendor/bundle/ruby/2.1.0/gems/paper_trail-3.0.5/lib/paper_trail/version_concern.rb:150:in `block in reify'\r\n  from .../vendor/bundle/ruby/2.1.0/gems/paper_trail-3.0.5/lib/paper_trail/version_concern.rb:225:in `call'\r\n  from .../vendor/bundle/ruby/2.1.0/gems/paper_trail-3.0.5/lib/paper_trail/version_concern.rb:225:in `without_identity_map'\r\n  from .../vendor/bundle/ruby/2.1.0/gems/paper_trail-3.0.5/lib/paper_trail/version_concern.rb:117:in `reify'\r\n```\r\n\r\nIt's because the `reify` method use `model.respond_to?(\"#{k}=\")` rather than `model.has_attribute?(k)`, so it could cause exception if I define a method named `address=` as well.\r\n\r\nThis pull request is to fix this error","created_at":"2014-09-29T07:36:54Z","updated_at":"2014-09-29T07:36:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/airblade/paper_trail/pulls/427/commits","review_comments_url":"https://api.github.com/repos/airblade/paper_trail/pulls/427/comments","review_comment_url":"https://api.github.com/repos/airblade/paper_trail/pulls/comments/{number}","comments_url":"https://api.github.com/repos/airblade/paper_trail/issues/427/comments","statuses_url":"https://api.github.com/repos/airblade/paper_trail/statuses/091b78e1d04adce27edf5b5b788cb62f1cc79ce1","head":{"label":"vinh0604:master","ref":"master","sha":"091b78e1d04adce27edf5b5b788cb62f1cc79ce1","user":{"login":"vinh0604","id":886778,"avatar_url":"https://avatars.githubusercontent.com/u/886778?v=2","gravatar_id":"","url":"https://api.github.com/users/vinh0604","html_url":"https://github.com/vinh0604","followers_url":"https://api.github.com/users/vinh0604/followers","following_url":"https://api.github.com/users/vinh0604/following{/other_user}","gists_url":"https://api.github.com/users/vinh0604/gists{/gist_id}","starred_url":"https://api.github.com/users/vinh0604/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vinh0604/subscriptions","organizations_url":"https://api.github.com/users/vinh0604/orgs","repos_url":"https://api.github.com/users/vinh0604/repos","events_url":"https://api.github.com/users/vinh0604/events{/privacy}","received_events_url":"https://api.github.com/users/vinh0604/received_events","type":"User","site_admin":false},"repo":{"id":24583720,"name":"paper_trail","full_name":"vinh0604/paper_trail","owner":{"login":"vinh0604","id":886778,"avatar_url":"https://avatars.githubusercontent.com/u/886778?v=2","gravatar_id":"","url":"https://api.github.com/users/vinh0604","html_url":"https://github.com/vinh0604","followers_url":"https://api.github.com/users/vinh0604/followers","following_url":"https://api.github.com/users/vinh0604/following{/other_user}","gists_url":"https://api.github.com/users/vinh0604/gists{/gist_id}","starred_url":"https://api.github.com/users/vinh0604/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vinh0604/subscriptions","organizations_url":"https://api.github.com/users/vinh0604/orgs","repos_url":"https://api.github.com/users/vinh0604/repos","events_url":"https://api.github.com/users/vinh0604/events{/privacy}","received_events_url":"https://api.github.com/users/vinh0604/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/vinh0604/paper_trail","description":"Track changes to your models' data.  Good for auditing or versioning.","fork":true,"url":"https://api.github.com/repos/vinh0604/paper_trail","forks_url":"https://api.github.com/repos/vinh0604/paper_trail/forks","keys_url":"https://api.github.com/repos/vinh0604/paper_trail/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vinh0604/paper_trail/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vinh0604/paper_trail/teams","hooks_url":"https://api.github.com/repos/vinh0604/paper_trail/hooks","issue_events_url":"https://api.github.com/repos/vinh0604/paper_trail/issues/events{/number}","events_url":"https://api.github.com/repos/vinh0604/paper_trail/events","assignees_url":"https://api.github.com/repos/vinh0604/paper_trail/assignees{/user}","branches_url":"https://api.github.com/repos/vinh0604/paper_trail/branches{/branch}","tags_url":"https://api.github.com/repos/vinh0604/paper_trail/tags","blobs_url":"https://api.github.com/repos/vinh0604/paper_trail/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vinh0604/paper_trail/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vinh0604/paper_trail/git/refs{/sha}","trees_url":"https://api.github.com/repos/vinh0604/paper_trail/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vinh0604/paper_trail/statuses/{sha}","languages_url":"https://api.github.com/repos/vinh0604/paper_trail/languages","stargazers_url":"https://api.github.com/repos/vinh0604/paper_trail/stargazers","contributors_url":"https://api.github.com/repos/vinh0604/paper_trail/contributors","subscribers_url":"https://api.github.com/repos/vinh0604/paper_trail/subscribers","subscription_url":"https://api.github.com/repos/vinh0604/paper_trail/subscription","commits_url":"https://api.github.com/repos/vinh0604/paper_trail/commits{/sha}","git_commits_url":"https://api.github.com/repos/vinh0604/paper_trail/git/commits{/sha}","comments_url":"https://api.github.com/repos/vinh0604/paper_trail/comments{/number}","issue_comment_url":"https://api.github.com/repos/vinh0604/paper_trail/issues/comments/{number}","contents_url":"https://api.github.com/repos/vinh0604/paper_trail/contents/{+path}","compare_url":"https://api.github.com/repos/vinh0604/paper_trail/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vinh0604/paper_trail/merges","archive_url":"https://api.github.com/repos/vinh0604/paper_trail/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vinh0604/paper_trail/downloads","issues_url":"https://api.github.com/repos/vinh0604/paper_trail/issues{/number}","pulls_url":"https://api.github.com/repos/vinh0604/paper_trail/pulls{/number}","milestones_url":"https://api.github.com/repos/vinh0604/paper_trail/milestones{/number}","notifications_url":"https://api.github.com/repos/vinh0604/paper_trail/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vinh0604/paper_trail/labels{/name}","releases_url":"https://api.github.com/repos/vinh0604/paper_trail/releases{/id}","created_at":"2014-09-29T07:15:19Z","updated_at":"2014-09-29T07:24:47Z","pushed_at":"2014-09-29T07:24:47Z","git_url":"git://github.com/vinh0604/paper_trail.git","ssh_url":"git@github.com:vinh0604/paper_trail.git","clone_url":"https://github.com/vinh0604/paper_trail.git","svn_url":"https://github.com/vinh0604/paper_trail","homepage":"","size":5260,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"airblade:master","ref":"master","sha":"8ce602cb7898713462a800dab85b2fb7d839c282","user":{"login":"airblade","id":7265,"avatar_url":"https://avatars.githubusercontent.com/u/7265?v=2","gravatar_id":"","url":"https://api.github.com/users/airblade","html_url":"https://github.com/airblade","followers_url":"https://api.github.com/users/airblade/followers","following_url":"https://api.github.com/users/airblade/following{/other_user}","gists_url":"https://api.github.com/users/airblade/gists{/gist_id}","starred_url":"https://api.github.com/users/airblade/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/airblade/subscriptions","organizations_url":"https://api.github.com/users/airblade/orgs","repos_url":"https://api.github.com/users/airblade/repos","events_url":"https://api.github.com/users/airblade/events{/privacy}","received_events_url":"https://api.github.com/users/airblade/received_events","type":"User","site_admin":false},"repo":{"id":211588,"name":"paper_trail","full_name":"airblade/paper_trail","owner":{"login":"airblade","id":7265,"avatar_url":"https://avatars.githubusercontent.com/u/7265?v=2","gravatar_id":"","url":"https://api.github.com/users/airblade","html_url":"https://github.com/airblade","followers_url":"https://api.github.com/users/airblade/followers","following_url":"https://api.github.com/users/airblade/following{/other_user}","gists_url":"https://api.github.com/users/airblade/gists{/gist_id}","starred_url":"https://api.github.com/users/airblade/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/airblade/subscriptions","organizations_url":"https://api.github.com/users/airblade/orgs","repos_url":"https://api.github.com/users/airblade/repos","events_url":"https://api.github.com/users/airblade/events{/privacy}","received_events_url":"https://api.github.com/users/airblade/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/airblade/paper_trail","description":"Track changes to your models' data.  Good for auditing or versioning.","fork":false,"url":"https://api.github.com/repos/airblade/paper_trail","forks_url":"https://api.github.com/repos/airblade/paper_trail/forks","keys_url":"https://api.github.com/repos/airblade/paper_trail/keys{/key_id}","collaborators_url":"https://api.github.com/repos/airblade/paper_trail/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/airblade/paper_trail/teams","hooks_url":"https://api.github.com/repos/airblade/paper_trail/hooks","issue_events_url":"https://api.github.com/repos/airblade/paper_trail/issues/events{/number}","events_url":"https://api.github.com/repos/airblade/paper_trail/events","assignees_url":"https://api.github.com/repos/airblade/paper_trail/assignees{/user}","branches_url":"https://api.github.com/repos/airblade/paper_trail/branches{/branch}","tags_url":"https://api.github.com/repos/airblade/paper_trail/tags","blobs_url":"https://api.github.com/repos/airblade/paper_trail/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/airblade/paper_trail/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/airblade/paper_trail/git/refs{/sha}","trees_url":"https://api.github.com/repos/airblade/paper_trail/git/trees{/sha}","statuses_url":"https://api.github.com/repos/airblade/paper_trail/statuses/{sha}","languages_url":"https://api.github.com/repos/airblade/paper_trail/languages","stargazers_url":"https://api.github.com/repos/airblade/paper_trail/stargazers","contributors_url":"https://api.github.com/repos/airblade/paper_trail/contributors","subscribers_url":"https://api.github.com/repos/airblade/paper_trail/subscribers","subscription_url":"https://api.github.com/repos/airblade/paper_trail/subscription","commits_url":"https://api.github.com/repos/airblade/paper_trail/commits{/sha}","git_commits_url":"https://api.github.com/repos/airblade/paper_trail/git/commits{/sha}","comments_url":"https://api.github.com/repos/airblade/paper_trail/comments{/number}","issue_comment_url":"https://api.github.com/repos/airblade/paper_trail/issues/comments/{number}","contents_url":"https://api.github.com/repos/airblade/paper_trail/contents/{+path}","compare_url":"https://api.github.com/repos/airblade/paper_trail/compare/{base}...{head}","merges_url":"https://api.github.com/repos/airblade/paper_trail/merges","archive_url":"https://api.github.com/repos/airblade/paper_trail/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/airblade/paper_trail/downloads","issues_url":"https://api.github.com/repos/airblade/paper_trail/issues{/number}","pulls_url":"https://api.github.com/repos/airblade/paper_trail/pulls{/number}","milestones_url":"https://api.github.com/repos/airblade/paper_trail/milestones{/number}","notifications_url":"https://api.github.com/repos/airblade/paper_trail/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/airblade/paper_trail/labels{/name}","releases_url":"https://api.github.com/repos/airblade/paper_trail/releases{/id}","created_at":"2009-05-27T15:20:55Z","updated_at":"2014-09-28T07:13:02Z","pushed_at":"2014-09-23T21:38:19Z","git_url":"git://github.com/airblade/paper_trail.git","ssh_url":"git@github.com:airblade/paper_trail.git","clone_url":"https://github.com/airblade/paper_trail.git","svn_url":"https://github.com/airblade/paper_trail","homepage":"","size":5260,"stargazers_count":2750,"watchers_count":2750,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":372,"mirror_url":null,"open_issues_count":42,"forks":372,"open_issues":42,"watchers":2750,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/airblade/paper_trail/pulls/427"},"html":{"href":"https://github.com/airblade/paper_trail/pull/427"},"issue":{"href":"https://api.github.com/repos/airblade/paper_trail/issues/427"},"comments":{"href":"https://api.github.com/repos/airblade/paper_trail/issues/427/comments"},"review_comments":{"href":"https://api.github.com/repos/airblade/paper_trail/pulls/427/comments"},"review_comment":{"href":"https://api.github.com/repos/airblade/paper_trail/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/airblade/paper_trail/pulls/427/commits"},"statuses":{"href":"https://api.github.com/repos/airblade/paper_trail/statuses/091b78e1d04adce27edf5b5b788cb62f1cc79ce1"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":1,"deletions":1,"changed_files":1}}