{"action":"closed","issue":{"url":"https://api.github.com/repos/AlchemyCMS/alchemy-guides/issues/29","repository_url":"https://api.github.com/repos/AlchemyCMS/alchemy-guides","labels_url":"https://api.github.com/repos/AlchemyCMS/alchemy-guides/issues/29/labels{/name}","comments_url":"https://api.github.com/repos/AlchemyCMS/alchemy-guides/issues/29/comments","events_url":"https://api.github.com/repos/AlchemyCMS/alchemy-guides/issues/29/events","html_url":"https://github.com/AlchemyCMS/alchemy-guides/issues/29","id":40485872,"number":29,"title":"Document the usage as an engine","user":{"login":"tvdeyen","id":42868,"avatar_url":"https://avatars.githubusercontent.com/u/42868?v=3","gravatar_id":"","url":"https://api.github.com/users/tvdeyen","html_url":"https://github.com/tvdeyen","followers_url":"https://api.github.com/users/tvdeyen/followers","following_url":"https://api.github.com/users/tvdeyen/following{/other_user}","gists_url":"https://api.github.com/users/tvdeyen/gists{/gist_id}","starred_url":"https://api.github.com/users/tvdeyen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tvdeyen/subscriptions","organizations_url":"https://api.github.com/users/tvdeyen/orgs","repos_url":"https://api.github.com/users/tvdeyen/repos","events_url":"https://api.github.com/users/tvdeyen/events{/privacy}","received_events_url":"https://api.github.com/users/tvdeyen/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2014-08-18T13:08:22Z","updated_at":"2016-12-02T06:01:37Z","closed_at":"2016-12-02T06:01:37Z","body":"Ported from https://github.com/magiclabs/alchemy_cms/issues/586\n\n---\n\nAlthough Alchemy has been made a Rails engine, there is unfortunately no documentation on how to use it yet.\n\nWe discovered problems when using Alchemy 2.9 as an engine in our Rails 3.2 app. We were particularly bitten by the fact that Alchemy helpers rely on the _declarative_authorization_ gem, which requires that `Authorization.current_user` has been set before each request. When using the rendering helpers inside our own controller actions, this led to user logins leaking between requests, as the authorization mechanism uses `Thread.current` variables.\n\nThe particular requirement to use a before_filter is [documented](https://github.com/stffn/declarative_authorization#providing-the-plugins-requirements) at the declarative_authorization gem. It should be part of the Alchemy's documentation on how to use it as an engine.\n"}}
{"actor":{"display_login":"tvdeyen"}}