{"action":"created","issue":{"url":"https://api.github.com/repos/ruby-china/ruby-china/issues/601","repository_url":"https://api.github.com/repos/ruby-china/ruby-china","labels_url":"https://api.github.com/repos/ruby-china/ruby-china/issues/601/labels{/name}","comments_url":"https://api.github.com/repos/ruby-china/ruby-china/issues/601/comments","events_url":"https://api.github.com/repos/ruby-china/ruby-china/issues/601/events","html_url":"https://github.com/ruby-china/ruby-china/issues/601","id":146782889,"number":601,"title":"Ruby-china topic 阅读数量是如何统计的","user":{"login":"wenweih","id":3449692,"avatar_url":"https://avatars.githubusercontent.com/u/3449692?v=3","gravatar_id":"","url":"https://api.github.com/users/wenweih","html_url":"https://github.com/wenweih","followers_url":"https://api.github.com/users/wenweih/followers","following_url":"https://api.github.com/users/wenweih/following{/other_user}","gists_url":"https://api.github.com/users/wenweih/gists{/gist_id}","starred_url":"https://api.github.com/users/wenweih/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wenweih/subscriptions","organizations_url":"https://api.github.com/users/wenweih/orgs","repos_url":"https://api.github.com/users/wenweih/repos","events_url":"https://api.github.com/users/wenweih/events{/privacy}","received_events_url":"https://api.github.com/users/wenweih/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-04-08T01:02:01Z","updated_at":"2016-04-08T02:03:39Z","closed_at":null,"body":"![image](https://cloud.githubusercontent.com/assets/3449692/14371183/b7078826-fd67-11e5-8402-0d728a05a43b.png)  \r\n请问帖子的阅读数量是怎么统计的。  \r\n我在 ```app/views/topics/_topic_info.html.erb``` partial 中找到 ```<%= topic.hits %> <%= t(\"common.read_times\")%>```,然后在 ``app/serializers/topic_detail_serializer.rb```中追踪到 ```hits```方法。但是在```topic.rb```中也发现有一个这样的关心 ```counter :hits, default: 0```  \r\n没看明白，请问是如何实现的呢。  \r\n谢谢。"},"comment":{"url":"https://api.github.com/repos/ruby-china/ruby-china/issues/comments/207173468","html_url":"https://github.com/ruby-china/ruby-china/issues/601#issuecomment-207173468","issue_url":"https://api.github.com/repos/ruby-china/ruby-china/issues/601","id":207173468,"user":{"login":"songjiayang","id":1459834,"avatar_url":"https://avatars.githubusercontent.com/u/1459834?v=3","gravatar_id":"","url":"https://api.github.com/users/songjiayang","html_url":"https://github.com/songjiayang","followers_url":"https://api.github.com/users/songjiayang/followers","following_url":"https://api.github.com/users/songjiayang/following{/other_user}","gists_url":"https://api.github.com/users/songjiayang/gists{/gist_id}","starred_url":"https://api.github.com/users/songjiayang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/songjiayang/subscriptions","organizations_url":"https://api.github.com/users/songjiayang/orgs","repos_url":"https://api.github.com/users/songjiayang/repos","events_url":"https://api.github.com/users/songjiayang/events{/privacy}","received_events_url":"https://api.github.com/users/songjiayang/received_events","type":"User","site_admin":false},"created_at":"2016-04-08T02:03:39Z","updated_at":"2016-04-08T02:03:39Z","body":"代码出处： https://github.com/ruby-china/ruby-china/blob/33379ada8f6a81425bd286c1d40bceb139b3a946/app/controllers/topics_controller.rb#L70\r\n\r\n使用到的 gem https://github.com/nateware/redis-objects .\r\n\r\n"}}