{"action":"closed","issue":{"url":"https://api.github.com/repos/rails/rails/issues/33389","repository_url":"https://api.github.com/repos/rails/rails","labels_url":"https://api.github.com/repos/rails/rails/issues/33389/labels{/name}","comments_url":"https://api.github.com/repos/rails/rails/issues/33389/comments","events_url":"https://api.github.com/repos/rails/rails/issues/33389/events","html_url":"https://github.com/rails/rails/issues/33389","id":342453455,"node_id":"MDU6SXNzdWUzNDI0NTM0NTU=","number":33389,"title":"assign_nested_attributes_for_collection_association does not call `build` method on extension defined for `has_many` association","user":{"login":"martinsp","id":557122,"node_id":"MDQ6VXNlcjU1NzEyMg==","avatar_url":"https://avatars2.githubusercontent.com/u/557122?v=4","gravatar_id":"","url":"https://api.github.com/users/martinsp","html_url":"https://github.com/martinsp","followers_url":"https://api.github.com/users/martinsp/followers","following_url":"https://api.github.com/users/martinsp/following{/other_user}","gists_url":"https://api.github.com/users/martinsp/gists{/gist_id}","starred_url":"https://api.github.com/users/martinsp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martinsp/subscriptions","organizations_url":"https://api.github.com/users/martinsp/orgs","repos_url":"https://api.github.com/users/martinsp/repos","events_url":"https://api.github.com/users/martinsp/events{/privacy}","received_events_url":"https://api.github.com/users/martinsp/received_events","type":"User","site_admin":false},"labels":[{"id":126910270,"node_id":"MDU6TGFiZWwxMjY5MTAyNzA=","url":"https://api.github.com/repos/rails/rails/labels/With%20reproduction%20steps","name":"With reproduction steps","color":"009800","default":false},{"id":107191,"node_id":"MDU6TGFiZWwxMDcxOTE=","url":"https://api.github.com/repos/rails/rails/labels/activerecord","name":"activerecord","color":"0b02e1","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-07-18T19:04:32Z","updated_at":"2018-08-05T00:05:03Z","closed_at":"2018-08-05T00:05:03Z","author_association":"NONE","body":"### Steps to reproduce\r\n1. Create a model with has_many association with extension defined using `:extend` option.\r\n2. Enable accepts_nested_attributes_for for the has_many association\r\n3. Build new associated objects with &lt;association&gt;_attributes= method \r\n\r\nFailing test case: [association-extension-failing.rb](https://gist.github.com/martinsp/92d17373699df5c16b0f00bbb1b174e3#file-association-extension-failing-rb)\r\n\r\nI have found a way to fix the issue, but I'm not sure if my approach is correct. The fix is in:  [association-extension-fixed.rb](https://gist.github.com/martinsp/92d17373699df5c16b0f00bbb1b174e3#file-association-extension-fixed-rb) on lines 92/93\r\n\r\n\r\n### Expected behavior\r\nA `build` on association extension set by `:extend` option should be called\r\n\r\n### Actual behavior\r\nA `build` method on association extension is not called\r\n\r\n### System configuration\r\n**Rails version**: 5.2.0\r\n\r\n**Ruby version**: ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-darwin17]\r\n"}}
{"actor":{"display_login":"schneems"}}