Methods
- C
- D
- F
- N
- U
Attributes
[RW] | notify | |
[RW] | notify_author |
Class Public methods
create_status_change_note(noteable, author, status)
Link
Source: show
# File app/models/note.rb, line 53 def self.create_status_change_note(noteable, author, status) create({ noteable: noteable, project: noteable.project, author: author, note: "_Status changed to #{status}_" }, without_protection: true) end
Instance Public methods
downvote?()
Link
Returns true if this is a downvote note, otherwise false is returned
Source: show
# File app/models/note.rb, line 125 def downvote? note.start_with?('-1') || note.start_with?(':-1:') end
for_commit?()
Link
Source: show
# File app/models/note.rb, line 101 def for_commit? noteable_type == "Commit" end
for_diff_line?()
Link
Source: show
# File app/models/note.rb, line 105 def for_diff_line? line_code.present? end
noteable()
Link
override to return commits, which are not active record
Source: show
# File app/models/note.rb, line 71 def noteable if for_commit? project.commit(commit_id) else super end # Temp fix to prevent app crash # if note commit id doesnt exist rescue nil end
noteable_type_name()
Link
Source: show
# File app/models/note.rb, line 129 def noteable_type_name if noteable_type.present? noteable_type.downcase else "wall" end end