{"action":"closed","issue":{"url":"https://api.github.com/repos/IFTTT/polo/issues/29","labels_url":"https://api.github.com/repos/IFTTT/polo/issues/29/labels{/name}","comments_url":"https://api.github.com/repos/IFTTT/polo/issues/29/comments","events_url":"https://api.github.com/repos/IFTTT/polo/issues/29/events","html_url":"https://github.com/IFTTT/polo/issues/29","id":122199101,"number":29,"title":"Specify table name in obfuscate calls","user":{"login":"nettofarah","id":270688,"avatar_url":"https://avatars.githubusercontent.com/u/270688?v=3","gravatar_id":"","url":"https://api.github.com/users/nettofarah","html_url":"https://github.com/nettofarah","followers_url":"https://api.github.com/users/nettofarah/followers","following_url":"https://api.github.com/users/nettofarah/following{/other_user}","gists_url":"https://api.github.com/users/nettofarah/gists{/gist_id}","starred_url":"https://api.github.com/users/nettofarah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nettofarah/subscriptions","organizations_url":"https://api.github.com/users/nettofarah/orgs","repos_url":"https://api.github.com/users/nettofarah/repos","events_url":"https://api.github.com/users/nettofarah/events{/privacy}","received_events_url":"https://api.github.com/users/nettofarah/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/IFTTT/polo/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/IFTTT/polo/labels/help%20wanted","name":"help wanted","color":"159818"},{"url":"https://api.github.com/repos/IFTTT/polo/labels/question","name":"question","color":"cc317c"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-12-15T05:54:13Z","updated_at":"2015-12-28T21:53:02Z","closed_at":"2015-12-28T21:53:02Z","body":"As of today, we just blindly try to match a global list of fields we want to be obfuscated against all the attributes of every row Polo traverses:\r\nhttps://github.com/IFTTT/polo/blob/b79e48e897c9a552cce64f0b9fd6f36e569035c0/lib/polo/translator.rb#L38\r\n\r\nTo do so, we pass in a list of fields to `Polo.configure`\r\n```ruby\r\nPolo.configure do\r\n  obfuscate :email\r\nend\r\n```\r\n\r\nWhile this has been working well, it could be the case that someone wants to only obfuscate certain fields in certain tables. \r\n\r\nWhat I'm suggesting is that we change the `obfuscate` method to also accept something like this:\r\n\r\n```ruby\r\nPolo.configure do\r\n  obfuscate \"users.email\" \r\nend\r\n``` \r\nSo in this case we're only obfuscating `email` fields in the `users` table, and not obfuscating emails on some other tables such as `invites` or some other table where emails are not sensitive."}}