{"action":"created","issue":{"url":"https://api.github.com/repos/sferik/rails_admin/issues/2263","labels_url":"https://api.github.com/repos/sferik/rails_admin/issues/2263/labels{/name}","comments_url":"https://api.github.com/repos/sferik/rails_admin/issues/2263/comments","events_url":"https://api.github.com/repos/sferik/rails_admin/issues/2263/events","html_url":"https://github.com/sferik/rails_admin/pull/2263","id":69587686,"number":2263,"title":"Fix incorrect counts for capsuled models with the same name","user":{"login":"DarthMax","id":1449357,"avatar_url":"https://avatars.githubusercontent.com/u/1449357?v=3","gravatar_id":"","url":"https://api.github.com/users/DarthMax","html_url":"https://github.com/DarthMax","followers_url":"https://api.github.com/users/DarthMax/followers","following_url":"https://api.github.com/users/DarthMax/following{/other_user}","gists_url":"https://api.github.com/users/DarthMax/gists{/gist_id}","starred_url":"https://api.github.com/users/DarthMax/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DarthMax/subscriptions","organizations_url":"https://api.github.com/users/DarthMax/orgs","repos_url":"https://api.github.com/users/DarthMax/repos","events_url":"https://api.github.com/users/DarthMax/events{/privacy}","received_events_url":"https://api.github.com/users/DarthMax/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/sferik/rails_admin/labels/needs%20test","name":"needs test","color":"006b75"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-04-20T13:32:04Z","updated_at":"2015-04-22T09:21:42Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/sferik/rails_admin/pulls/2263","html_url":"https://github.com/sferik/rails_admin/pull/2263","diff_url":"https://github.com/sferik/rails_admin/pull/2263.diff","patch_url":"https://github.com/sferik/rails_admin/pull/2263.patch"},"body":"If I have 2 models that share the same name but are encapsulated in different modules the entity counts on the dashboard page are incorrect. This happens as the counts are stored in a hash using the value `AbstractModel#pretty_name` as key. This method itself uses `Model#model_name` which strips the module name. In this specific case this results in the same key for different models and therefore in wrong counts. \r\n\r\nThis can be fixed by using `Model#name` instead of `Model#model_name` for the key."},"comment":{"url":"https://api.github.com/repos/sferik/rails_admin/issues/comments/95089108","html_url":"https://github.com/sferik/rails_admin/pull/2263#issuecomment-95089108","issue_url":"https://api.github.com/repos/sferik/rails_admin/issues/2263","id":95089108,"user":{"login":"mshibuya","id":486678,"avatar_url":"https://avatars.githubusercontent.com/u/486678?v=3","gravatar_id":"","url":"https://api.github.com/users/mshibuya","html_url":"https://github.com/mshibuya","followers_url":"https://api.github.com/users/mshibuya/followers","following_url":"https://api.github.com/users/mshibuya/following{/other_user}","gists_url":"https://api.github.com/users/mshibuya/gists{/gist_id}","starred_url":"https://api.github.com/users/mshibuya/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mshibuya/subscriptions","organizations_url":"https://api.github.com/users/mshibuya/orgs","repos_url":"https://api.github.com/users/mshibuya/repos","events_url":"https://api.github.com/users/mshibuya/events{/privacy}","received_events_url":"https://api.github.com/users/mshibuya/received_events","type":"User","site_admin":false},"created_at":"2015-04-22T09:21:42Z","updated_at":"2015-04-22T09:21:42Z","body":"Please also create `User::Confirmed` model for [mongoid](https://github.com/sferik/rails_admin/tree/master/spec/dummy_app/app/mongoid)."}}