{"action":"created","issue":{"url":"https://api.github.com/repos/globalize/globalize/issues/288","labels_url":"https://api.github.com/repos/globalize/globalize/issues/288/labels{/name}","comments_url":"https://api.github.com/repos/globalize/globalize/issues/288/comments","events_url":"https://api.github.com/repos/globalize/globalize/issues/288/events","html_url":"https://github.com/globalize/globalize/issues/288","id":21537702,"number":288,"title":"ActiveRecord::Relation patch breaks building of relations with conditions","user":{"login":"the8472","id":1065730,"avatar_url":"https://avatars.githubusercontent.com/u/1065730?v=3","gravatar_id":"","url":"https://api.github.com/users/the8472","html_url":"https://github.com/the8472","followers_url":"https://api.github.com/users/the8472/followers","following_url":"https://api.github.com/users/the8472/following{/other_user}","gists_url":"https://api.github.com/users/the8472/gists{/gist_id}","starred_url":"https://api.github.com/users/the8472/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/the8472/subscriptions","organizations_url":"https://api.github.com/users/the8472/orgs","repos_url":"https://api.github.com/users/the8472/repos","events_url":"https://api.github.com/users/the8472/events{/privacy}","received_events_url":"https://api.github.com/users/the8472/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/globalize/globalize/labels/3-1-stable","name":"3-1-stable","color":"fbca04"},{"url":"https://api.github.com/repos/globalize/globalize/labels/bug","name":"bug","color":"e11d21"},{"url":"https://api.github.com/repos/globalize/globalize/labels/master","name":"master","color":"5319e7"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":46,"created_at":"2013-10-24T17:21:55Z","updated_at":"2015-02-13T11:43:24Z","closed_at":null,"body":"The update from 0.3.0 to 0.3.1 broke building instances of relations that have conditions. Normally rails would build pre-fill all attributes with the conditions to ensure the created record will match the association.\r\nAfter the update it creates a blank object instead\r\n\r\nI'm not sure whether this is a conflict between patches from squeel[1] and globalize[2], but requiring squeel after globalize so that its patch applies last seems to work.\r\nIt's also possible that relation building is broken with vanilla rails 3.2.x.\r\n\r\n\r\n[1] https://github.com/ernie/squeel/blob/master/lib/squeel/adapters/active_record/relation_extensions.rb#L397-406\r\n[2] https://github.com/globalize/globalize/blob/v0.3.1/lib/patches/active_record/relation.rb#L4-12\r\n"},"comment":{"url":"https://api.github.com/repos/globalize/globalize/issues/comments/74241905","html_url":"https://github.com/globalize/globalize/issues/288#issuecomment-74241905","issue_url":"https://api.github.com/repos/globalize/globalize/issues/288","id":74241905,"user":{"login":"itschn","id":31039,"avatar_url":"https://avatars.githubusercontent.com/u/31039?v=3","gravatar_id":"","url":"https://api.github.com/users/itschn","html_url":"https://github.com/itschn","followers_url":"https://api.github.com/users/itschn/followers","following_url":"https://api.github.com/users/itschn/following{/other_user}","gists_url":"https://api.github.com/users/itschn/gists{/gist_id}","starred_url":"https://api.github.com/users/itschn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/itschn/subscriptions","organizations_url":"https://api.github.com/users/itschn/orgs","repos_url":"https://api.github.com/users/itschn/repos","events_url":"https://api.github.com/users/itschn/events{/privacy}","received_events_url":"https://api.github.com/users/itschn/received_events","type":"User","site_admin":false},"created_at":"2015-02-13T11:43:24Z","updated_at":"2015-02-13T11:43:24Z","body":"1+"}}