summaryrefslogtreecommitdiff
path: root/app/models/note.rb
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2015-10-14 22:42:59 +0200
committerDouwe Maan <douwe@gitlab.com>2015-10-14 22:42:59 +0200
commitef44138ce42de6a02724a7be10b6eb08873a3c1e (patch)
tree2ed4084aabf42a046d4cd0d2ad5441dc66b9fc9e /app/models/note.rb
parent528d2823e9888ae09aa03b72c2e61cd0b9a39937 (diff)
parent123669a55107514798ba531ba3a744b3ec8503ee (diff)
downloadgitlab-ce-ef44138ce42de6a02724a7be10b6eb08873a3c1e.tar.gz
Merge branch 'master' into rs-redactor-filter
Diffstat (limited to 'app/models/note.rb')
-rw-r--r--app/models/note.rb13
1 files changed, 3 insertions, 10 deletions
diff --git a/app/models/note.rb b/app/models/note.rb
index b4d6ddba703..96cacd667c1 100644
--- a/app/models/note.rb
+++ b/app/models/note.rb
@@ -62,7 +62,6 @@ class Note < ActiveRecord::Base
serialize :st_diff
before_create :set_diff, if: ->(n) { n.line_code.present? }
- after_update :set_references
class << self
def discussions_from_notes(notes)
@@ -333,15 +332,13 @@ class Note < ActiveRecord::Base
end
def noteable_type_name
- if noteable_type.present?
- noteable_type.downcase
- end
+ noteable_type.downcase if noteable_type.present?
end
# FIXME: Hack for polymorphic associations with STI
# For more information visit http://api.rubyonrails.org/classes/ActiveRecord/Associations/ClassMethods.html#label-Polymorphic+Associations
- def noteable_type=(sType)
- super(sType.to_s.classify.constantize.base_class.to_s)
+ def noteable_type=(noteable_type)
+ super(noteable_type.to_s.classify.constantize.base_class.to_s)
end
# Reset notes events cache
@@ -357,10 +354,6 @@ class Note < ActiveRecord::Base
Event.reset_event_cache_for(self)
end
- def set_references
- create_new_cross_references!(project, author)
- end
-
def system?
read_attribute(:system)
end