提交 be1ae2d6 编写于 作者: D Douwe Maan

Merge branch 'rs-note-delegates-mentionable'

# Conflicts:
#	app/models/note.rb
......@@ -39,6 +39,7 @@ class Note < ActiveRecord::Base
has_many :todos, dependent: :destroy
delegate :gfm_reference, :local_reference, to: :noteable
delegate :name, to: :project, prefix: true
delegate :name, :email, to: :author, prefix: true
......@@ -313,16 +314,6 @@ class Note < ActiveRecord::Base
nil
end
# Mentionable override.
def gfm_reference(from_project = nil)
noteable.gfm_reference(from_project)
end
# Mentionable override.
def local_reference
noteable
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=(noteable_type)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册