{"action":"created","issue":{"url":"https://api.github.com/repos/activeadmin/activeadmin/issues/5239","repository_url":"https://api.github.com/repos/activeadmin/activeadmin","labels_url":"https://api.github.com/repos/activeadmin/activeadmin/issues/5239/labels{/name}","comments_url":"https://api.github.com/repos/activeadmin/activeadmin/issues/5239/comments","events_url":"https://api.github.com/repos/activeadmin/activeadmin/issues/5239/events","html_url":"https://github.com/activeadmin/activeadmin/issues/5239","id":272774285,"number":5239,"title":"undefined method `total_count' for #<ActiveRecord::Relation []>","user":{"login":"winstonwolff","id":281580,"avatar_url":"https://avatars2.githubusercontent.com/u/281580?v=4","gravatar_id":"","url":"https://api.github.com/users/winstonwolff","html_url":"https://github.com/winstonwolff","followers_url":"https://api.github.com/users/winstonwolff/followers","following_url":"https://api.github.com/users/winstonwolff/following{/other_user}","gists_url":"https://api.github.com/users/winstonwolff/gists{/gist_id}","starred_url":"https://api.github.com/users/winstonwolff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/winstonwolff/subscriptions","organizations_url":"https://api.github.com/users/winstonwolff/orgs","repos_url":"https://api.github.com/users/winstonwolff/repos","events_url":"https://api.github.com/users/winstonwolff/events{/privacy}","received_events_url":"https://api.github.com/users/winstonwolff/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":11,"created_at":"2017-11-10T00:04:53Z","updated_at":"2017-11-22T13:01:06Z","closed_at":"2017-11-14T17:28:47Z","author_association":"NONE","body":"We upgraded to Rails 5.1.4 and ActiveAdmin 1.1.0 and now an active_admin show page raises this exception. In my active-admin model file, I can comment out the line `active_admin_comments` and it works fine so I suspect the problem is in there. In the screenshot there is unfortunately no stack trace other than my model .rb file.\r\n\r\n### Expected behavior\r\n\r\nNo exception should be raised.\r\n\r\n### Actual behavior\r\n\r\nShowing .../.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activeadmin-1.1.0/app/views/active_admin/resource/show.html.arb where line #2 raised:\r\n\r\nundefined method `total_count' for #<ActiveRecord::Relation []>\r\n\r\n![screen shot 2017-11-09 at 15 58 57](https://user-images.githubusercontent.com/281580/32635869-f1580f28-c566-11e7-8ca5-e07aee295384.png)\r\n\r\n\r\n### How to reproduce\r\n\r\nI make the simplest active-admin model file like so, and it crashes:\r\n\r\n```\r\nActiveAdmin.register ClinicSource do\r\n  show do\r\n    active_admin_comments\r\n  end\r\nend\r\n```"},"comment":{"url":"https://api.github.com/repos/activeadmin/activeadmin/issues/comments/346343564","html_url":"https://github.com/activeadmin/activeadmin/issues/5239#issuecomment-346343564","issue_url":"https://api.github.com/repos/activeadmin/activeadmin/issues/5239","id":346343564,"user":{"login":"AaronGaim","id":9059606,"avatar_url":"https://avatars0.githubusercontent.com/u/9059606?v=4","gravatar_id":"","url":"https://api.github.com/users/AaronGaim","html_url":"https://github.com/AaronGaim","followers_url":"https://api.github.com/users/AaronGaim/followers","following_url":"https://api.github.com/users/AaronGaim/following{/other_user}","gists_url":"https://api.github.com/users/AaronGaim/gists{/gist_id}","starred_url":"https://api.github.com/users/AaronGaim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AaronGaim/subscriptions","organizations_url":"https://api.github.com/users/AaronGaim/orgs","repos_url":"https://api.github.com/users/AaronGaim/repos","events_url":"https://api.github.com/users/AaronGaim/events{/privacy}","received_events_url":"https://api.github.com/users/AaronGaim/received_events","type":"User","site_admin":false},"created_at":"2017-11-22T13:01:06Z","updated_at":"2017-11-22T13:01:06Z","author_association":"NONE","body":"I have the following bug (undefined method `total_count' for #<ActiveRecord::Relation []>) if there is a Json typle column (e.g '{\"test\": 1}') on the table, moving on show page will couse this error. \r\nBut only if you not created custom show page before, e.g.\r\n```\r\n    show do |ad|\r\n       attributes_table do\r\n         row :id\r\n         row :json_column\r\n      end\r\n   end\r\n```"}}
{"actor":{"display_login":"AaronGaim"}}