{"action":"created","issue":{"url":"https://api.github.com/repos/davidcelis/api-pagination/issues/64","repository_url":"https://api.github.com/repos/davidcelis/api-pagination","labels_url":"https://api.github.com/repos/davidcelis/api-pagination/issues/64/labels{/name}","comments_url":"https://api.github.com/repos/davidcelis/api-pagination/issues/64/comments","events_url":"https://api.github.com/repos/davidcelis/api-pagination/issues/64/events","html_url":"https://github.com/davidcelis/api-pagination/issues/64","id":173303621,"number":64,"title":"ActionView::MissingTemplate when passing in the template or action options","user":{"login":"codeodor","id":23479,"avatar_url":"https://avatars.githubusercontent.com/u/23479?v=3","gravatar_id":"","url":"https://api.github.com/users/codeodor","html_url":"https://github.com/codeodor","followers_url":"https://api.github.com/users/codeodor/followers","following_url":"https://api.github.com/users/codeodor/following{/other_user}","gists_url":"https://api.github.com/users/codeodor/gists{/gist_id}","starred_url":"https://api.github.com/users/codeodor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codeodor/subscriptions","organizations_url":"https://api.github.com/users/codeodor/orgs","repos_url":"https://api.github.com/users/codeodor/repos","events_url":"https://api.github.com/users/codeodor/events{/privacy}","received_events_url":"https://api.github.com/users/codeodor/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2016-08-25T20:36:17Z","updated_at":"2016-08-26T23:54:20Z","closed_at":"2016-08-26T17:41:13Z","body":"Code looks like this:\r\n\r\n```ruby\r\nmodule Api\r\n  module V1\r\n    class TeamsController < ApiController\r\n      def mine\r\n        @teams = current_user.teams\r\n        paginate @teams, action: 'index'\r\n      end\r\n    end\r\n  end\r\nend\r\n```\r\n\r\nIf I change it to `render` and drop the collection, it renders as expected (minus the headers this gem adds). However, if I try to paginate, it all of the sudden looks for the `mine` template instead of the specified `index` template.\r\n\r\n\r\nIf I change it to `paginate json: @teams, action: 'index'` it does not use my template at all, resulting in an information leak (I'm assuming it just calls `as_json` on the AR collection)."},"comment":{"url":"https://api.github.com/repos/davidcelis/api-pagination/issues/comments/242879252","html_url":"https://github.com/davidcelis/api-pagination/issues/64#issuecomment-242879252","issue_url":"https://api.github.com/repos/davidcelis/api-pagination/issues/64","id":242879252,"user":{"login":"davidcelis","id":36873,"avatar_url":"https://avatars.githubusercontent.com/u/36873?v=3","gravatar_id":"","url":"https://api.github.com/users/davidcelis","html_url":"https://github.com/davidcelis","followers_url":"https://api.github.com/users/davidcelis/followers","following_url":"https://api.github.com/users/davidcelis/following{/other_user}","gists_url":"https://api.github.com/users/davidcelis/gists{/gist_id}","starred_url":"https://api.github.com/users/davidcelis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidcelis/subscriptions","organizations_url":"https://api.github.com/users/davidcelis/orgs","repos_url":"https://api.github.com/users/davidcelis/repos","events_url":"https://api.github.com/users/davidcelis/events{/privacy}","received_events_url":"https://api.github.com/users/davidcelis/received_events","type":"User","site_admin":true},"created_at":"2016-08-26T23:54:20Z","updated_at":"2016-08-26T23:54:20Z","body":"Gotcha, looks like that documentation could be improved too. It mimics calls to `render` when the `json` or `xml` options are passed 😅 "}}
{"actor":{"display_login":"davidcelis"}}