{"action":"created","issue":{"url":"https://api.github.com/repos/leikind/wice_grid/issues/258","labels_url":"https://api.github.com/repos/leikind/wice_grid/issues/258/labels{/name}","comments_url":"https://api.github.com/repos/leikind/wice_grid/issues/258/comments","events_url":"https://api.github.com/repos/leikind/wice_grid/issues/258/events","html_url":"https://github.com/leikind/wice_grid/issues/258","id":108133980,"number":258,"title":"Parameter total_entries doesnt work?","user":{"login":"radeno","id":58521,"avatar_url":"https://avatars.githubusercontent.com/u/58521?v=3","gravatar_id":"","url":"https://api.github.com/users/radeno","html_url":"https://github.com/radeno","followers_url":"https://api.github.com/users/radeno/followers","following_url":"https://api.github.com/users/radeno/following{/other_user}","gists_url":"https://api.github.com/users/radeno/gists{/gist_id}","starred_url":"https://api.github.com/users/radeno/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/radeno/subscriptions","organizations_url":"https://api.github.com/users/radeno/orgs","repos_url":"https://api.github.com/users/radeno/repos","events_url":"https://api.github.com/users/radeno/events{/privacy}","received_events_url":"https://api.github.com/users/radeno/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-09-24T13:49:57Z","updated_at":"2015-09-26T08:32:49Z","closed_at":null,"body":"Hi,\r\n\r\nIs parameter `:total_entries` for `initialize_grid` just blind parameter?\r\nI see in code that you uses do_count method to count entries, which is alias for AR count method.\r\n\r\nIs there any way how to override internal counting ? We use complex aggregated functions in SQL query and `count` method just wraps our sql code and it doest work anymore. We must use `length` method to count result.\r\n\r\nIs there any solution how to override couting?\r\n\r\nRegards!"},"comment":{"url":"https://api.github.com/repos/leikind/wice_grid/issues/comments/143409919","html_url":"https://github.com/leikind/wice_grid/issues/258#issuecomment-143409919","issue_url":"https://api.github.com/repos/leikind/wice_grid/issues/258","id":143409919,"user":{"login":"radeno","id":58521,"avatar_url":"https://avatars.githubusercontent.com/u/58521?v=3","gravatar_id":"","url":"https://api.github.com/users/radeno","html_url":"https://github.com/radeno","followers_url":"https://api.github.com/users/radeno/followers","following_url":"https://api.github.com/users/radeno/following{/other_user}","gists_url":"https://api.github.com/users/radeno/gists{/gist_id}","starred_url":"https://api.github.com/users/radeno/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/radeno/subscriptions","organizations_url":"https://api.github.com/users/radeno/orgs","repos_url":"https://api.github.com/users/radeno/repos","events_url":"https://api.github.com/users/radeno/events{/privacy}","received_events_url":"https://api.github.com/users/radeno/received_events","type":"User","site_admin":false},"created_at":"2015-09-26T08:32:49Z","updated_at":"2015-09-26T08:32:49Z","body":"Understand,\r\n\r\nmaybe it is interesting to pass-in `initialize_grid` some Kaminari parameters. For example Kaminari has possibility to change count with `:total_count` parameter. Rails AR are not much smart when `joins` or `group` using native SQL commands instead symbols as association names.\r\n\r\nFor example we use SQL table view, it is much faster than multiple `includes`. This also with some aggregate functions in scopes and AR collapses because it doesnt know how to use COUNT properly on that query.\r\n\r\nWhat do you think?"}}