rgoraya/wc_master — comment on commit 7cec7433caa43a9622cf456ee9ebacfbc58ef125
File: app/models/user.rb line 202
By nguyendl:

Oh , that is because before the code was changed, there was an "each" loop at the beginning. Now since it's gone, just change the break to this code:

if relationship_version.nil?
activity[:what]='? '
else
cause_version=Version.find(:all, :conditions=>['item_type=? AND item_id=?', 'Issue', relationship_version.get_object.cause_id]).first
issue_version=Version.find(:all, :conditions=>['item_type=? AND item_id=?', 'Issue', relationship_version.get_object.issue_id]).first
if cause_version.nil? || issue_version.nil?
activity[:what]='? '
else
activity[:what]=cause_version.get_object.title + ' ➡ ' + issue_version.get_object.title
end
end