{"action":"created","issue":{"url":"https://api.github.com/repos/Niedzwiedz/montekombat/issues/5","repository_url":"https://api.github.com/repos/Niedzwiedz/montekombat","labels_url":"https://api.github.com/repos/Niedzwiedz/montekombat/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/Niedzwiedz/montekombat/issues/5/comments","events_url":"https://api.github.com/repos/Niedzwiedz/montekombat/issues/5/events","html_url":"https://github.com/Niedzwiedz/montekombat/pull/5","id":181622856,"number":5,"title":"Editing tournament representers","user":{"login":"Niedzwiedz","id":2966261,"avatar_url":"https://avatars.githubusercontent.com/u/2966261?v=3","gravatar_id":"","url":"https://api.github.com/users/Niedzwiedz","html_url":"https://github.com/Niedzwiedz","followers_url":"https://api.github.com/users/Niedzwiedz/followers","following_url":"https://api.github.com/users/Niedzwiedz/following{/other_user}","gists_url":"https://api.github.com/users/Niedzwiedz/gists{/gist_id}","starred_url":"https://api.github.com/users/Niedzwiedz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Niedzwiedz/subscriptions","organizations_url":"https://api.github.com/users/Niedzwiedz/orgs","repos_url":"https://api.github.com/users/Niedzwiedz/repos","events_url":"https://api.github.com/users/Niedzwiedz/events{/privacy}","received_events_url":"https://api.github.com/users/Niedzwiedz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":11,"created_at":"2016-10-07T09:28:43Z","updated_at":"2016-11-04T13:32:19Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Niedzwiedz/montekombat/pulls/5","html_url":"https://github.com/Niedzwiedz/montekombat/pull/5","diff_url":"https://github.com/Niedzwiedz/montekombat/pull/5.diff","patch_url":"https://github.com/Niedzwiedz/montekombat/pull/5.patch"},"body":"Editing tournament feature with representers as api feature.\n\n<!-- Reviewable:start -->\n---\n\nThis change is [<img src=\"https://reviewable.io/review_button.svg\" height=\"34\" align=\"absmiddle\" alt=\"Reviewable\"/>](https://reviewable.io/reviews/niedzwiedz/montekombat/5)\n\n<!-- Reviewable:end -->\n"},"comment":{"url":"https://api.github.com/repos/Niedzwiedz/montekombat/issues/comments/258431557","html_url":"https://github.com/Niedzwiedz/montekombat/pull/5#issuecomment-258431557","issue_url":"https://api.github.com/repos/Niedzwiedz/montekombat/issues/5","id":258431557,"user":{"login":"kapone89","id":1898786,"avatar_url":"https://avatars.githubusercontent.com/u/1898786?v=3","gravatar_id":"","url":"https://api.github.com/users/kapone89","html_url":"https://github.com/kapone89","followers_url":"https://api.github.com/users/kapone89/followers","following_url":"https://api.github.com/users/kapone89/following{/other_user}","gists_url":"https://api.github.com/users/kapone89/gists{/gist_id}","starred_url":"https://api.github.com/users/kapone89/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kapone89/subscriptions","organizations_url":"https://api.github.com/users/kapone89/orgs","repos_url":"https://api.github.com/users/kapone89/repos","events_url":"https://api.github.com/users/kapone89/events{/privacy}","received_events_url":"https://api.github.com/users/kapone89/received_events","type":"User","site_admin":false},"created_at":"2016-11-04T13:32:19Z","updated_at":"2016-11-04T13:32:19Z","body":"\n\n\n\nReview status: 29 of 46 files reviewed at latest revision, 12 unresolved discussions.\n\n---\n\n*[app/controllers/teams_controller.rb, line 19 at r3](https://reviewable.io:443/reviews/niedzwiedz/montekombat/5#-KVjW_xIFFWupUZcc-Tx:-KVjW_xIFFWupUZcc-Ty:bsp43vg) ([raw file](https://github.com/niedzwiedz/montekombat/blob/45b00093adee0c95ab1ebb3cf9334ae81934ac32/app/controllers/teams_controller.rb#L19)):*\n> ```Ruby\n>     if @team.tournament.creator == current_user\n>       @user = User.find(user_params)\n>       @team.users << @user\n> ```\n\nWhen you call ```<<``` on a relation, it will trigger SQL query. Try to avoid it using ```build``` so changes will be saved when you call ```save```\n\n---\n\n*[app/controllers/tournaments_controller.rb, line 50 at r3](https://reviewable.io:443/reviews/niedzwiedz/montekombat/5#-KVjXBVIbR8TOsSG2F3z:-KVjXBVIbR8TOsSG2F4-:bi0h0hu) ([raw file](https://github.com/niedzwiedz/montekombat/blob/45b00093adee0c95ab1ebb3cf9334ae81934ac32/app/controllers/tournaments_controller.rb#L50)):*\n> ```Ruby\n>   def update\n>     unless tournament.ended?\n>       if tournament.update(edit_params(tournament))\n> ```\n\nSame when you are updating stuff. U can call ```update!``` and catch ActiveRecord::Record invalid\n\n---\n\n\n*Comments from [Reviewable](https://reviewable.io:443/reviews/niedzwiedz/montekombat/5)*\n<!-- Sent from Reviewable.io -->\n"}}
{"actor":{"display_login":"kapone89"}}