{"action":"created","issue":{"url":"https://api.github.com/repos/mbleigh/acts-as-taggable-on/issues/91","labels_url":"https://api.github.com/repos/mbleigh/acts-as-taggable-on/issues/91/labels{/name}","comments_url":"https://api.github.com/repos/mbleigh/acts-as-taggable-on/issues/91/comments","events_url":"https://api.github.com/repos/mbleigh/acts-as-taggable-on/issues/91/events","html_url":"https://github.com/mbleigh/acts-as-taggable-on/issues/91","id":232100,"number":91,"title":"Eager loading tags","user":{"login":"karant","id":26477,"avatar_url":"https://avatars.githubusercontent.com/u/26477?v=3","gravatar_id":"","url":"https://api.github.com/users/karant","html_url":"https://github.com/karant","followers_url":"https://api.github.com/users/karant/followers","following_url":"https://api.github.com/users/karant/following{/other_user}","gists_url":"https://api.github.com/users/karant/gists{/gist_id}","starred_url":"https://api.github.com/users/karant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karant/subscriptions","organizations_url":"https://api.github.com/users/karant/orgs","repos_url":"https://api.github.com/users/karant/repos","events_url":"https://api.github.com/users/karant/events{/privacy}","received_events_url":"https://api.github.com/users/karant/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mbleigh/acts-as-taggable-on/labels/feature","name":"feature","color":"02e10c"},{"url":"https://api.github.com/repos/mbleigh/acts-as-taggable-on/labels/sql","name":"sql","color":"d7e102"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/mbleigh/acts-as-taggable-on/milestones/9","html_url":"https://github.com/mbleigh/acts-as-taggable-on/milestones/3.3.0","labels_url":"https://api.github.com/repos/mbleigh/acts-as-taggable-on/milestones/9/labels","id":646140,"number":9,"title":"3.3.0","description":"","creator":{"login":"seuros","id":2394703,"avatar_url":"https://avatars.githubusercontent.com/u/2394703?v=3","gravatar_id":"","url":"https://api.github.com/users/seuros","html_url":"https://github.com/seuros","followers_url":"https://api.github.com/users/seuros/followers","following_url":"https://api.github.com/users/seuros/following{/other_user}","gists_url":"https://api.github.com/users/seuros/gists{/gist_id}","starred_url":"https://api.github.com/users/seuros/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/seuros/subscriptions","organizations_url":"https://api.github.com/users/seuros/orgs","repos_url":"https://api.github.com/users/seuros/repos","events_url":"https://api.github.com/users/seuros/events{/privacy}","received_events_url":"https://api.github.com/users/seuros/received_events","type":"User","site_admin":false},"open_issues":5,"closed_issues":11,"state":"closed","created_at":"2014-05-01T15:14:49Z","updated_at":"2014-11-25T14:15:54Z","due_on":"2014-06-01T07:00:00Z","closed_at":"2014-11-25T14:15:54Z"},"comments":22,"created_at":"2010-06-27T01:08:50Z","updated_at":"2015-03-19T16:38:27Z","closed_at":null,"body":"Is there any way to eager load tags for each taggable?  For example:\r\n\r\ntaggables = Taggable.find(:all, :include => [:base_tags])\r\ntaggables.each do |taggable|\r\n  taggable.all_tags_list # << How do you prevent a separate SQL call for each taggable?\r\nend\r\n\r\nI am on rails 2.3.5 so the base_tags.where call that retrieves all_tags_list is backported via named_scope with conditions, which I imagine causes a SQL hit for each record, regardless of any eager loading.  Please let me know if this can be achieved somehow or if this is not possible/supported?\r\n\r\nBest regards,\r\n\r\nAnton"},"comment":{"url":"https://api.github.com/repos/mbleigh/acts-as-taggable-on/issues/comments/83653826","html_url":"https://github.com/mbleigh/acts-as-taggable-on/issues/91#issuecomment-83653826","issue_url":"https://api.github.com/repos/mbleigh/acts-as-taggable-on/issues/91","id":83653826,"user":{"login":"bradphelan","id":17650,"avatar_url":"https://avatars.githubusercontent.com/u/17650?v=3","gravatar_id":"","url":"https://api.github.com/users/bradphelan","html_url":"https://github.com/bradphelan","followers_url":"https://api.github.com/users/bradphelan/followers","following_url":"https://api.github.com/users/bradphelan/following{/other_user}","gists_url":"https://api.github.com/users/bradphelan/gists{/gist_id}","starred_url":"https://api.github.com/users/bradphelan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bradphelan/subscriptions","organizations_url":"https://api.github.com/users/bradphelan/orgs","repos_url":"https://api.github.com/users/bradphelan/repos","events_url":"https://api.github.com/users/bradphelan/events{/privacy}","received_events_url":"https://api.github.com/users/bradphelan/received_events","type":"User","site_admin":false},"created_at":"2015-03-19T16:38:27Z","updated_at":"2015-03-19T16:38:27Z","body":"Ooops. .. thought this was a post wrt to my library rockettag. I don't own\nthe repository to acts as taggable on.\n\nOn Thu, 19 Mar 2015 17:37 Brad Phelan <bradphelan@xtargets.com> wrote:\n\n> If somebody wants to take over the repository they are welcome as I now\n> longer maintain the project.\n>\n> On Thu, 19 Mar 2015 17:36 Patrick <notifications@github.com> wrote:\n>\n>> +1\n>>\n>> —\n>> Reply to this email directly or view it on GitHub\n>> <https://github.com/mbleigh/acts-as-taggable-on/issues/91#issuecomment-83653259>\n>> .\n>>\n>\n"}}