{"action":"created","issue":{"url":"https://api.github.com/repos/flyerhzm/bullet/issues/404","repository_url":"https://api.github.com/repos/flyerhzm/bullet","labels_url":"https://api.github.com/repos/flyerhzm/bullet/issues/404/labels{/name}","comments_url":"https://api.github.com/repos/flyerhzm/bullet/issues/404/comments","events_url":"https://api.github.com/repos/flyerhzm/bullet/issues/404/events","html_url":"https://github.com/flyerhzm/bullet/issues/404","id":317894033,"number":404,"title":"N+1 query detected even when associations are not accessed ","user":{"login":"Mohakjuneja","id":5263550,"avatar_url":"https://avatars1.githubusercontent.com/u/5263550?v=4","gravatar_id":"","url":"https://api.github.com/users/Mohakjuneja","html_url":"https://github.com/Mohakjuneja","followers_url":"https://api.github.com/users/Mohakjuneja/followers","following_url":"https://api.github.com/users/Mohakjuneja/following{/other_user}","gists_url":"https://api.github.com/users/Mohakjuneja/gists{/gist_id}","starred_url":"https://api.github.com/users/Mohakjuneja/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mohakjuneja/subscriptions","organizations_url":"https://api.github.com/users/Mohakjuneja/orgs","repos_url":"https://api.github.com/users/Mohakjuneja/repos","events_url":"https://api.github.com/users/Mohakjuneja/events{/privacy}","received_events_url":"https://api.github.com/users/Mohakjuneja/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-04-26T06:30:06Z","updated_at":"2018-04-26T12:59:24Z","closed_at":null,"author_association":"NONE","body":"`class Content`\r\n`belongs_to :subject`\r\n`belongs_to :course`\r\n`belongs_to :user`\r\n`has_many :subscriptions`\r\n`has_many :payments`\r\n`end`\r\n\r\nWhile performing this selective update operation\r\n\r\n`        contents = Content.where(:id.in => params[:ids])`\r\n`        contents.each do |content|`\r\n`          content.update_attributes(newprice: content.oldprice * 2)`\r\n`        end\r\n`\r\n\r\nBullet returns a n+1 warning for every association for the content model.\r\n\r\nN+1 Query detected\r\n  Content => [:payments]\r\n  Add to your finder: :includes => [:payments]\r\n\r\nHowever, none of the associations are required or accessed. Is it a bug or an error on my part? My Gemfile version of Bullet is 5.0.0\r\n"},"comment":{"url":"https://api.github.com/repos/flyerhzm/bullet/issues/comments/384632101","html_url":"https://github.com/flyerhzm/bullet/issues/404#issuecomment-384632101","issue_url":"https://api.github.com/repos/flyerhzm/bullet/issues/404","id":384632101,"user":{"login":"flyerhzm","id":66836,"avatar_url":"https://avatars2.githubusercontent.com/u/66836?v=4","gravatar_id":"","url":"https://api.github.com/users/flyerhzm","html_url":"https://github.com/flyerhzm","followers_url":"https://api.github.com/users/flyerhzm/followers","following_url":"https://api.github.com/users/flyerhzm/following{/other_user}","gists_url":"https://api.github.com/users/flyerhzm/gists{/gist_id}","starred_url":"https://api.github.com/users/flyerhzm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flyerhzm/subscriptions","organizations_url":"https://api.github.com/users/flyerhzm/orgs","repos_url":"https://api.github.com/users/flyerhzm/repos","events_url":"https://api.github.com/users/flyerhzm/events{/privacy}","received_events_url":"https://api.github.com/users/flyerhzm/received_events","type":"User","site_admin":false},"created_at":"2018-04-26T12:59:24Z","updated_at":"2018-04-26T12:59:24Z","author_association":"OWNER","body":"@Mohakjuneja is oldprice calculated by payments?"}}
{"actor":{"display_login":"flyerhzm"}}