[#101] fix undefined method `[]` for nil:NilClass

This commit is contained in:
Alexander Machehin 2013-04-13 09:06:06 +06:00
parent 28fe61330a
commit 67f9c166ad
1 changed files with 1 additions and 0 deletions

View File

@ -142,6 +142,7 @@ class Comment < ActiveRecord::Base
case
when item.is_a?(GitHook)
elements = commits
opts = {}
when item.is_a?(Issue)
elements = [[item, item.title], [item, item.body]]
opts = {:created_from_issue_id => item.id}