GitHub PullRequestReviewCommentEvent at 2014-03-11 04:29:56
Repository: food-rescue-robot
Actor: somerandomsequence
Payload: {"comment":{"url":"https://api.github.com/repos/somerandomsequence/food-rescue-robot/pulls/comments/10461499","id":10461499,"diff_hunk":"@@ -1,5 +1,18 @@\n class LogPart < ActiveRecord::Base\n   belongs_to :log\n   belongs_to :food_type\n-  attr_accessible :required, :weight, :count, :description, :food_type_id, :log_id\n+  attr_accessible :required, :weight, :count, :description, :food_type_id, :scale_type_id, :log_id\n+\n+\n+  before_save {\n+      if(self.log.region.scale_types.length==1)\n+        self.log.scale_type_id = self.log.region.scale_types.first.id\n+      end","path":"app/models/log_part.rb","position":11,"original_position":11,"commit_id":"07967291c68301d893f8ab014ed3daf3380719b1","original_commit_id":"07967291c68301d893f8ab014ed3daf3380719b1","user":{"login":"somerandomsequence","id":1183662,"avatar_url":"https://gravatar.com/avatar/851e0ccd05c071bc753f025757ef3940?d=https%3A%2F%2Fidenticons.github.com%2Fc1d5f2856546b50cc19c76995c21dc36.png&r=x","gravatar_id":"851e0ccd05c071bc753f025757ef3940","url":"https://api.github.com/users/somerandomsequence","html_url":"https://github.com/somerandomsequence","followers_url":"https://api.github.com/users/somerandomsequence/followers","following_url":"https://api.github.com/users/somerandomsequence/following{/other_user}","gists_url":"https://api.github.com/users/somerandomsequence/gists{/gist_id}","starred_url":"https://api.github.com/users/somerandomsequence/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/somerandomsequence/subscriptions","organizations_url":"https://api.github.com/users/somerandomsequence/orgs","repos_url":"https://api.github.com/users/somerandomsequence/repos","events_url":"https://api.github.com/users/somerandomsequence/events{/privacy}","received_events_url":"https://api.github.com/users/somerandomsequence/received_events","type":"User","site_admin":false},"body":"I think you probably want an \"else\" here, otherwise the stuff below will execute regardless.","created_at":"2014-03-11T04:29:56Z","updated_at":"2014-03-11T04:29:56Z","html_url":"https://github.com/somerandomsequence/food-rescue-robot/pull/7#discussion_r10461499","pull_request_url":"https://api.github.com/repos/somerandomsequence/food-rescue-robot/pulls/7","_links":{"self":{"href":"https://api.github.com/repos/somerandomsequence/food-rescue-robot/pulls/comments/10461499"},"html":{"href":"https://github.com/somerandomsequence/food-rescue-robot/pull/7#discussion_r10461499"},"pull_request":{"href":"https://api.github.com/repos/somerandomsequence/food-rescue-robot/pulls/7"}}}}