{"action":"closed","issue":{"url":"https://api.github.com/repos/rubyforgood/diaper/issues/421","repository_url":"https://api.github.com/repos/rubyforgood/diaper","labels_url":"https://api.github.com/repos/rubyforgood/diaper/issues/421/labels{/name}","comments_url":"https://api.github.com/repos/rubyforgood/diaper/issues/421/comments","events_url":"https://api.github.com/repos/rubyforgood/diaper/issues/421/events","html_url":"https://github.com/rubyforgood/diaper/issues/421","id":330973029,"node_id":"MDU6SXNzdWUzMzA5NzMwMjk=","number":421,"title":"Optimize `transferred_to` and `transferred_from` in the `Transfer` model","user":{"login":"armahillo","id":502363,"node_id":"MDQ6VXNlcjUwMjM2Mw==","avatar_url":"https://avatars2.githubusercontent.com/u/502363?v=4","gravatar_id":"","url":"https://api.github.com/users/armahillo","html_url":"https://github.com/armahillo","followers_url":"https://api.github.com/users/armahillo/followers","following_url":"https://api.github.com/users/armahillo/following{/other_user}","gists_url":"https://api.github.com/users/armahillo/gists{/gist_id}","starred_url":"https://api.github.com/users/armahillo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/armahillo/subscriptions","organizations_url":"https://api.github.com/users/armahillo/orgs","repos_url":"https://api.github.com/users/armahillo/repos","events_url":"https://api.github.com/users/armahillo/events{/privacy}","received_events_url":"https://api.github.com/users/armahillo/received_events","type":"User","site_admin":false},"labels":[{"id":589259360,"node_id":"MDU6TGFiZWw1ODkyNTkzNjA=","url":"https://api.github.com/repos/rubyforgood/diaper/labels/enhancement","name":"enhancement","color":"84b6eb","default":true},{"id":589259361,"node_id":"MDU6TGFiZWw1ODkyNTkzNjE=","url":"https://api.github.com/repos/rubyforgood/diaper/labels/help%20wanted","name":"help wanted","color":"128A0C","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/rubyforgood/diaper/milestones/5","html_url":"https://github.com/rubyforgood/diaper/milestone/5","labels_url":"https://api.github.com/repos/rubyforgood/diaper/milestones/5/labels","id":3066984,"node_id":"MDk6TWlsZXN0b25lMzA2Njk4NA==","number":5,"title":"National Diaper Bank Demo","description":"We want to demo this product to the National Diaper Bank this October. This will require it be reasonably stable and ready to use.","creator":{"login":"armahillo","id":502363,"node_id":"MDQ6VXNlcjUwMjM2Mw==","avatar_url":"https://avatars2.githubusercontent.com/u/502363?v=4","gravatar_id":"","url":"https://api.github.com/users/armahillo","html_url":"https://github.com/armahillo","followers_url":"https://api.github.com/users/armahillo/followers","following_url":"https://api.github.com/users/armahillo/following{/other_user}","gists_url":"https://api.github.com/users/armahillo/gists{/gist_id}","starred_url":"https://api.github.com/users/armahillo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/armahillo/subscriptions","organizations_url":"https://api.github.com/users/armahillo/orgs","repos_url":"https://api.github.com/users/armahillo/repos","events_url":"https://api.github.com/users/armahillo/events{/privacy}","received_events_url":"https://api.github.com/users/armahillo/received_events","type":"User","site_admin":false},"open_issues":25,"closed_issues":20,"state":"open","created_at":"2018-01-26T17:42:24Z","updated_at":"2018-06-16T22:52:19Z","due_on":"2018-06-30T07:00:00Z","closed_at":null},"comments":2,"created_at":"2018-06-10T14:26:32Z","updated_at":"2018-06-16T22:52:19Z","closed_at":"2018-06-16T22:52:19Z","author_association":"COLLABORATOR","body":"```\r\ndef self.storage_locations_transferred_to_in(organization)\r\n   includes(:to).where(organization_id: organization.id).distinct(:to_id).collect(&:to).uniq\r\nend\r\ndef self.storage_locations_transferred_from_in(organization)\r\n   includes(:from).where(organization_id: organization.id).distinct(:from_id).collect(&:from).uniq\r\nend\r\n```\r\n\r\nCurrently, this is what we have.\r\n\r\nI'm getting code smell from it, but I'm not sure specifically why. Could someone evaluate the performance of this to see if it can be optimized any further?"}}
{"actor":{"display_login":"armahillo"}}