{"action":"created","issue":{"url":"https://api.github.com/repos/martinrehfeld/role_model/issues/41","repository_url":"https://api.github.com/repos/martinrehfeld/role_model","labels_url":"https://api.github.com/repos/martinrehfeld/role_model/issues/41/labels{/name}","comments_url":"https://api.github.com/repos/martinrehfeld/role_model/issues/41/comments","events_url":"https://api.github.com/repos/martinrehfeld/role_model/issues/41/events","html_url":"https://github.com/martinrehfeld/role_model/issues/41","id":313543934,"number":41,"title":"Role detection not consistent","user":{"login":"boboroshi","id":2223,"avatar_url":"https://avatars2.githubusercontent.com/u/2223?v=4","gravatar_id":"","url":"https://api.github.com/users/boboroshi","html_url":"https://github.com/boboroshi","followers_url":"https://api.github.com/users/boboroshi/followers","following_url":"https://api.github.com/users/boboroshi/following{/other_user}","gists_url":"https://api.github.com/users/boboroshi/gists{/gist_id}","starred_url":"https://api.github.com/users/boboroshi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/boboroshi/subscriptions","organizations_url":"https://api.github.com/users/boboroshi/orgs","repos_url":"https://api.github.com/users/boboroshi/repos","events_url":"https://api.github.com/users/boboroshi/events{/privacy}","received_events_url":"https://api.github.com/users/boboroshi/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-04-12T01:27:56Z","updated_at":"2018-04-13T07:55:39Z","closed_at":"2018-04-13T07:55:39Z","author_association":"NONE","body":"So I have a model (Lodge) which has admins assigned to it through an editorship table. The super_admin can manage all (cancancan). Users are Devise-based. \r\n\r\nThis code renders intermittently:\r\n\r\n```\r\n <% if current_user.roles.include?(:super_admin) %>\r\n        <%= link_to \"Permissions\",\r\n                    edit_admin_lodge_permissions_path(lodge),\r\n                    class: 'button button-small' %>\r\n <% end %>\r\n```\r\n\r\nSo randomly, this button does not show up:\r\n<img width=\"846\" alt=\"screenshot 2018-04-11 21 22 55\" src=\"https://user-images.githubusercontent.com/2223/38651387-f7909ce4-3dce-11e8-93f7-005e217c40ca.png\">\r\n\r\nThere's nothing different on that particular lodge (or the ones that it affects). Any idea what might be happening? This will also, on different objects and at random, fail for this statement as well:\r\n\r\n`<% if can? :manage, lodge %>`"},"comment":{"url":"https://api.github.com/repos/martinrehfeld/role_model/issues/comments/381055406","html_url":"https://github.com/martinrehfeld/role_model/issues/41#issuecomment-381055406","issue_url":"https://api.github.com/repos/martinrehfeld/role_model/issues/41","id":381055406,"user":{"login":"martinrehfeld","id":12546,"avatar_url":"https://avatars1.githubusercontent.com/u/12546?v=4","gravatar_id":"","url":"https://api.github.com/users/martinrehfeld","html_url":"https://github.com/martinrehfeld","followers_url":"https://api.github.com/users/martinrehfeld/followers","following_url":"https://api.github.com/users/martinrehfeld/following{/other_user}","gists_url":"https://api.github.com/users/martinrehfeld/gists{/gist_id}","starred_url":"https://api.github.com/users/martinrehfeld/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martinrehfeld/subscriptions","organizations_url":"https://api.github.com/users/martinrehfeld/orgs","repos_url":"https://api.github.com/users/martinrehfeld/repos","events_url":"https://api.github.com/users/martinrehfeld/events{/privacy}","received_events_url":"https://api.github.com/users/martinrehfeld/received_events","type":"User","site_admin":false},"created_at":"2018-04-13T07:55:39Z","updated_at":"2018-04-13T07:55:39Z","author_association":"OWNER","body":"To be honest, I expect this to be some subtlety in your own code base. Both Canard and RoleModel have been around for a while, so it seems unlikely that a bug right in the core functionality exists. But you never know; feel free to re-open if you find actionable intel."}}
{"actor":{"display_login":"martinrehfeld"}}