summaryrefslogtreecommitdiff
path: root/app/models
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-08-19 22:12:59 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-08-19 22:12:59 +0300
commit20397091f10f4c00db7cfab7b8598b9a6b7fdec1 (patch)
tree749f6b3885010561ec391370d77f23c7e10ef13b /app/models
parent608f3286539fbcdb4727cb77623261fa506381ff (diff)
downloadgitlab-ce-20397091f10f4c00db7cfab7b8598b9a6b7fdec1.tar.gz
Show iid in event feed and uatocomplete as default id for issues, mr
Diffstat (limited to 'app/models')
-rw-r--r--app/models/event.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/event.rb b/app/models/event.rb
index 759e84bb55a..5839a834e78 100644
--- a/app/models/event.rb
+++ b/app/models/event.rb
@@ -256,6 +256,10 @@ class Event < ActiveRecord::Base
target.commit_id
end
+ def target_iid
+ target.respond_to?(:iid) ? target.iid : target_id
+ end
+
def note_short_commit_id
note_commit_id[0..8]
end