Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kazuhiko Shiozaki
gitlab-ce
Commits
be1ae2d6
Commit
be1ae2d6
authored
Mar 07, 2016
by
Douwe Maan
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'rs-note-delegates-mentionable'
# Conflicts: # app/models/note.rb
parents
49d7a293
84dab62c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
10 deletions
+1
-10
app/models/note.rb
app/models/note.rb
+1
-10
No files found.
app/models/note.rb
View file @
be1ae2d6
...
@@ -39,6 +39,7 @@ class Note < ActiveRecord::Base
...
@@ -39,6 +39,7 @@ class Note < ActiveRecord::Base
has_many
:todos
,
dependent: :destroy
has_many
:todos
,
dependent: :destroy
delegate
:gfm_reference
,
:local_reference
,
to: :noteable
delegate
:name
,
to: :project
,
prefix:
true
delegate
:name
,
to: :project
,
prefix:
true
delegate
:name
,
:email
,
to: :author
,
prefix:
true
delegate
:name
,
:email
,
to: :author
,
prefix:
true
...
@@ -313,16 +314,6 @@ class Note < ActiveRecord::Base
...
@@ -313,16 +314,6 @@ class Note < ActiveRecord::Base
nil
nil
end
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
# FIXME: Hack for polymorphic associations with STI
# For more information visit http://api.rubyonrails.org/classes/ActiveRecord/Associations/ClassMethods.html#label-Polymorphic+Associations
# For more information visit http://api.rubyonrails.org/classes/ActiveRecord/Associations/ClassMethods.html#label-Polymorphic+Associations
def
noteable_type
=
(
noteable_type
)
def
noteable_type
=
(
noteable_type
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment