{"action":"created","issue":{"url":"https://api.github.com/repos/airblade/paper_trail/issues/587","labels_url":"https://api.github.com/repos/airblade/paper_trail/issues/587/labels{/name}","comments_url":"https://api.github.com/repos/airblade/paper_trail/issues/587/comments","events_url":"https://api.github.com/repos/airblade/paper_trail/issues/587/events","html_url":"https://github.com/airblade/paper_trail/pull/587","id":99836856,"number":587,"title":"Prevent global variable pollution","user":{"login":"grosser","id":11367,"avatar_url":"https://avatars.githubusercontent.com/u/11367?v=3","gravatar_id":"","url":"https://api.github.com/users/grosser","html_url":"https://github.com/grosser","followers_url":"https://api.github.com/users/grosser/followers","following_url":"https://api.github.com/users/grosser/following{/other_user}","gists_url":"https://api.github.com/users/grosser/gists{/gist_id}","starred_url":"https://api.github.com/users/grosser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grosser/subscriptions","organizations_url":"https://api.github.com/users/grosser/orgs","repos_url":"https://api.github.com/users/grosser/repos","events_url":"https://api.github.com/users/grosser/events{/privacy}","received_events_url":"https://api.github.com/users/grosser/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-08-08T21:56:33Z","updated_at":"2015-08-10T04:01:01Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/airblade/paper_trail/pulls/587","html_url":"https://github.com/airblade/paper_trail/pull/587","diff_url":"https://github.com/airblade/paper_trail/pull/587.diff","patch_url":"https://github.com/airblade/paper_trail/pull/587.patch"},"body":"atm if controller A sets whodunnit and then some other controller runs that does not include papertrail the whodunnit state lingers around, this also makes testing ugly since the whodunnit will randomly change and be lest in a bad state -> unrelated tests can fail.\r\n\r\nThese helpers should also be useful in general for background jobs or any task that does not want to change up global state.\r\n\r\n@jaredbeck "},"comment":{"url":"https://api.github.com/repos/airblade/paper_trail/issues/comments/129291677","html_url":"https://github.com/airblade/paper_trail/pull/587#issuecomment-129291677","issue_url":"https://api.github.com/repos/airblade/paper_trail/issues/587","id":129291677,"user":{"login":"grosser","id":11367,"avatar_url":"https://avatars.githubusercontent.com/u/11367?v=3","gravatar_id":"","url":"https://api.github.com/users/grosser","html_url":"https://github.com/grosser","followers_url":"https://api.github.com/users/grosser/followers","following_url":"https://api.github.com/users/grosser/following{/other_user}","gists_url":"https://api.github.com/users/grosser/gists{/gist_id}","starred_url":"https://api.github.com/users/grosser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grosser/subscriptions","organizations_url":"https://api.github.com/users/grosser/orgs","repos_url":"https://api.github.com/users/grosser/repos","events_url":"https://api.github.com/users/grosser/events{/privacy}","received_events_url":"https://api.github.com/users/grosser/received_events","type":"User","site_admin":false},"created_at":"2015-08-10T04:01:01Z","updated_at":"2015-08-10T04:01:01Z","body":"I'm coming from an app where global state was always left behind, so I don't trust it / want to avoid messing it up :)\r\n\r\nI guess using request_store solves that ... but now you added another gem to do something that is trivial to do in ruby ... also encouraged users to use a polluting pattern without offering any alternatives.\r\n\r\nSo if you think adding another dependency is less complexity then using around then maybe leave the controller extensions as they are, but add the with_xxx helpers ?\r\nI'm using my own around_filter anyway since I did not realize there was this extensions."}}