{"action":"opened","number":21133,"pull_request":{"url":"https://api.github.com/repos/rails/rails/pulls/21133","id":41686743,"html_url":"https://github.com/rails/rails/pull/21133","diff_url":"https://github.com/rails/rails/pull/21133.diff","patch_url":"https://github.com/rails/rails/pull/21133.patch","issue_url":"https://api.github.com/repos/rails/rails/issues/21133","number":21133,"state":"open","locked":false,"title":"Fix Persistance#become bug with wrong errors base","user":{"login":"palkan","id":1516722,"avatar_url":"https://avatars.githubusercontent.com/u/1516722?v=3","gravatar_id":"","url":"https://api.github.com/users/palkan","html_url":"https://github.com/palkan","followers_url":"https://api.github.com/users/palkan/followers","following_url":"https://api.github.com/users/palkan/following{/other_user}","gists_url":"https://api.github.com/users/palkan/gists{/gist_id}","starred_url":"https://api.github.com/users/palkan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/palkan/subscriptions","organizations_url":"https://api.github.com/users/palkan/orgs","repos_url":"https://api.github.com/users/palkan/repos","events_url":"https://api.github.com/users/palkan/events{/privacy}","received_events_url":"https://api.github.com/users/palkan/received_events","type":"User","site_admin":false},"body":"The problem is that _copied_ `errors` object contains reference to the origin record (`@base` variable) instead of `became`. If we have, for example, different store accessors with validations in base class and became class, `Errors#generate_message` fails calling `read_attribute_for_validation`.\r\n\r\nTest case can be found here: https://gist.github.com/palkan/7599122ed095c7000553 .","created_at":"2015-08-05T14:44:54Z","updated_at":"2015-08-05T14:44:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/rails/rails/pulls/21133/commits","review_comments_url":"https://api.github.com/repos/rails/rails/pulls/21133/comments","review_comment_url":"https://api.github.com/repos/rails/rails/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rails/rails/issues/21133/comments","statuses_url":"https://api.github.com/repos/rails/rails/statuses/72a2204695473fccf00f6338d4d1eff907a3f90e","head":{"label":"palkan:fix-become","ref":"fix-become","sha":"72a2204695473fccf00f6338d4d1eff907a3f90e","user":{"login":"palkan","id":1516722,"avatar_url":"https://avatars.githubusercontent.com/u/1516722?v=3","gravatar_id":"","url":"https://api.github.com/users/palkan","html_url":"https://github.com/palkan","followers_url":"https://api.github.com/users/palkan/followers","following_url":"https://api.github.com/users/palkan/following{/other_user}","gists_url":"https://api.github.com/users/palkan/gists{/gist_id}","starred_url":"https://api.github.com/users/palkan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/palkan/subscriptions","organizations_url":"https://api.github.com/users/palkan/orgs","repos_url":"https://api.github.com/users/palkan/repos","events_url":"https://api.github.com/users/palkan/events{/privacy}","received_events_url":"https://api.github.com/users/palkan/received_events","type":"User","site_admin":false},"repo":{"id":30144471,"name":"rails","full_name":"palkan/rails","owner":{"login":"palkan","id":1516722,"avatar_url":"https://avatars.githubusercontent.com/u/1516722?v=3","gravatar_id":"","url":"https://api.github.com/users/palkan","html_url":"https://github.com/palkan","followers_url":"https://api.github.com/users/palkan/followers","following_url":"https://api.github.com/users/palkan/following{/other_user}","gists_url":"https://api.github.com/users/palkan/gists{/gist_id}","starred_url":"https://api.github.com/users/palkan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/palkan/subscriptions","organizations_url":"https://api.github.com/users/palkan/orgs","repos_url":"https://api.github.com/users/palkan/repos","events_url":"https://api.github.com/users/palkan/events{/privacy}","received_events_url":"https://api.github.com/users/palkan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/palkan/rails","description":"Ruby on Rails","fork":true,"url":"https://api.github.com/repos/palkan/rails","forks_url":"https://api.github.com/repos/palkan/rails/forks","keys_url":"https://api.github.com/repos/palkan/rails/keys{/key_id}","collaborators_url":"https://api.github.com/repos/palkan/rails/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/palkan/rails/teams","hooks_url":"https://api.github.com/repos/palkan/rails/hooks","issue_events_url":"https://api.github.com/repos/palkan/rails/issues/events{/number}","events_url":"https://api.github.com/repos/palkan/rails/events","assignees_url":"https://api.github.com/repos/palkan/rails/assignees{/user}","branches_url":"https://api.github.com/repos/palkan/rails/branches{/branch}","tags_url":"https://api.github.com/repos/palkan/rails/tags","blobs_url":"https://api.github.com/repos/palkan/rails/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/palkan/rails/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/palkan/rails/git/refs{/sha}","trees_url":"https://api.github.com/repos/palkan/rails/git/trees{/sha}","statuses_url":"https://api.github.com/repos/palkan/rails/statuses/{sha}","languages_url":"https://api.github.com/repos/palkan/rails/languages","stargazers_url":"https://api.github.com/repos/palkan/rails/stargazers","contributors_url":"https://api.github.com/repos/palkan/rails/contributors","subscribers_url":"https://api.github.com/repos/palkan/rails/subscribers","subscription_url":"https://api.github.com/repos/palkan/rails/subscription","commits_url":"https://api.github.com/repos/palkan/rails/commits{/sha}","git_commits_url":"https://api.github.com/repos/palkan/rails/git/commits{/sha}","comments_url":"https://api.github.com/repos/palkan/rails/comments{/number}","issue_comment_url":"https://api.github.com/repos/palkan/rails/issues/comments{/number}","contents_url":"https://api.github.com/repos/palkan/rails/contents/{+path}","compare_url":"https://api.github.com/repos/palkan/rails/compare/{base}...{head}","merges_url":"https://api.github.com/repos/palkan/rails/merges","archive_url":"https://api.github.com/repos/palkan/rails/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/palkan/rails/downloads","issues_url":"https://api.github.com/repos/palkan/rails/issues{/number}","pulls_url":"https://api.github.com/repos/palkan/rails/pulls{/number}","milestones_url":"https://api.github.com/repos/palkan/rails/milestones{/number}","notifications_url":"https://api.github.com/repos/palkan/rails/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/palkan/rails/labels{/name}","releases_url":"https://api.github.com/repos/palkan/rails/releases{/id}","created_at":"2015-02-01T11:44:23Z","updated_at":"2015-04-30T08:25:05Z","pushed_at":"2015-08-05T14:38:14Z","git_url":"git://github.com/palkan/rails.git","ssh_url":"git@github.com:palkan/rails.git","clone_url":"https://github.com/palkan/rails.git","svn_url":"https://github.com/palkan/rails","homepage":"http://rubyonrails.org","size":141806,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"rails:master","ref":"master","sha":"57989c58dfffa8854d2bcb706202cd04a418da70","user":{"login":"rails","id":4223,"avatar_url":"https://avatars.githubusercontent.com/u/4223?v=3","gravatar_id":"","url":"https://api.github.com/users/rails","html_url":"https://github.com/rails","followers_url":"https://api.github.com/users/rails/followers","following_url":"https://api.github.com/users/rails/following{/other_user}","gists_url":"https://api.github.com/users/rails/gists{/gist_id}","starred_url":"https://api.github.com/users/rails/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rails/subscriptions","organizations_url":"https://api.github.com/users/rails/orgs","repos_url":"https://api.github.com/users/rails/repos","events_url":"https://api.github.com/users/rails/events{/privacy}","received_events_url":"https://api.github.com/users/rails/received_events","type":"Organization","site_admin":false},"repo":{"id":8514,"name":"rails","full_name":"rails/rails","owner":{"login":"rails","id":4223,"avatar_url":"https://avatars.githubusercontent.com/u/4223?v=3","gravatar_id":"","url":"https://api.github.com/users/rails","html_url":"https://github.com/rails","followers_url":"https://api.github.com/users/rails/followers","following_url":"https://api.github.com/users/rails/following{/other_user}","gists_url":"https://api.github.com/users/rails/gists{/gist_id}","starred_url":"https://api.github.com/users/rails/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rails/subscriptions","organizations_url":"https://api.github.com/users/rails/orgs","repos_url":"https://api.github.com/users/rails/repos","events_url":"https://api.github.com/users/rails/events{/privacy}","received_events_url":"https://api.github.com/users/rails/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rails/rails","description":"Ruby on Rails","fork":false,"url":"https://api.github.com/repos/rails/rails","forks_url":"https://api.github.com/repos/rails/rails/forks","keys_url":"https://api.github.com/repos/rails/rails/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rails/rails/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rails/rails/teams","hooks_url":"https://api.github.com/repos/rails/rails/hooks","issue_events_url":"https://api.github.com/repos/rails/rails/issues/events{/number}","events_url":"https://api.github.com/repos/rails/rails/events","assignees_url":"https://api.github.com/repos/rails/rails/assignees{/user}","branches_url":"https://api.github.com/repos/rails/rails/branches{/branch}","tags_url":"https://api.github.com/repos/rails/rails/tags","blobs_url":"https://api.github.com/repos/rails/rails/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rails/rails/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rails/rails/git/refs{/sha}","trees_url":"https://api.github.com/repos/rails/rails/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rails/rails/statuses/{sha}","languages_url":"https://api.github.com/repos/rails/rails/languages","stargazers_url":"https://api.github.com/repos/rails/rails/stargazers","contributors_url":"https://api.github.com/repos/rails/rails/contributors","subscribers_url":"https://api.github.com/repos/rails/rails/subscribers","subscription_url":"https://api.github.com/repos/rails/rails/subscription","commits_url":"https://api.github.com/repos/rails/rails/commits{/sha}","git_commits_url":"https://api.github.com/repos/rails/rails/git/commits{/sha}","comments_url":"https://api.github.com/repos/rails/rails/comments{/number}","issue_comment_url":"https://api.github.com/repos/rails/rails/issues/comments{/number}","contents_url":"https://api.github.com/repos/rails/rails/contents/{+path}","compare_url":"https://api.github.com/repos/rails/rails/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rails/rails/merges","archive_url":"https://api.github.com/repos/rails/rails/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rails/rails/downloads","issues_url":"https://api.github.com/repos/rails/rails/issues{/number}","pulls_url":"https://api.github.com/repos/rails/rails/pulls{/number}","milestones_url":"https://api.github.com/repos/rails/rails/milestones{/number}","notifications_url":"https://api.github.com/repos/rails/rails/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rails/rails/labels{/name}","releases_url":"https://api.github.com/repos/rails/rails/releases{/id}","created_at":"2008-04-11T02:19:47Z","updated_at":"2015-08-05T13:48:03Z","pushed_at":"2015-08-05T14:37:59Z","git_url":"git://github.com/rails/rails.git","ssh_url":"git@github.com:rails/rails.git","clone_url":"https://github.com/rails/rails.git","svn_url":"https://github.com/rails/rails","homepage":"http://rubyonrails.org","size":440679,"stargazers_count":27150,"watchers_count":27150,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":10876,"mirror_url":null,"open_issues_count":907,"forks":10876,"open_issues":907,"watchers":27150,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rails/rails/pulls/21133"},"html":{"href":"https://github.com/rails/rails/pull/21133"},"issue":{"href":"https://api.github.com/repos/rails/rails/issues/21133"},"comments":{"href":"https://api.github.com/repos/rails/rails/issues/21133/comments"},"review_comments":{"href":"https://api.github.com/repos/rails/rails/pulls/21133/comments"},"review_comment":{"href":"https://api.github.com/repos/rails/rails/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rails/rails/pulls/21133/commits"},"statuses":{"href":"https://api.github.com/repos/rails/rails/statuses/72a2204695473fccf00f6338d4d1eff907a3f90e"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":2,"deletions":0,"changed_files":2}}